New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 836948 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Proj-VR
Proj-XR



Sign in to add a comment

Fix orientation calculation in XRSession::UpdateCanvasDimensions

Project Member Reported by lincolnfrog@chromium.org, Apr 25 2018

Issue description

the current code won't work correctly if the canvas is square, or if there's a flip from 90 to 270 degree orientation that's fast enough to skip the portrait layout in between.

Alternative would be to always use current orientation (which could be fetched browser-side as earlier, instead of passed from Blink), and accept that there's always a glitch for a few frames after orientation changes. IMHO that looks pretty bad, doesn't seem worth it for the corner cases.


 
Labels: Proj-XR-AR
Cc: klausw@chromium.org vollick@chromium.org billorr@chromium.org
It also seems odd that we get the orientation in Blink only to pass it all the way down to ARCore. There is a timing reason for this, but I think we should better understand what is happening and determine the best way to achieve seamless transitions (at least as seamless as the rest of Chrome and layout).
Should try to reuse display::Display::Rotation enum / there is already a mojo interface for display for this.
Project Member

Comment 4 by bugdroid1@chromium.org, May 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5efab6814eaeef62c4a2b34ece221009badc6002

commit 5efab6814eaeef62c4a2b34ece221009badc6002
Author: Ian Vollick <vollick@chromium.org>
Date: Tue May 08 04:19:35 2018

[ar] Plumb display::Display::Rotation rather than angles

Previously, we'd plumbed the display rotation as an integral
angle, but the only valid values were 0, 90, 180 and 270
degrees. We then converted to an enum. With this CL, we
plumb the enum directly.

Bug: 836948
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: Ia99aa7543188fb56f9595cea835b2dfee496f811
Reviewed-on: https://chromium-review.googlesource.com/1045910
Commit-Queue: Ian Vollick <vollick@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556685}
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ash/display/cros_display_config.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ash/display/cros_display_config_unittest.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/chrome/browser/extensions/system_display/display_info_provider_chromeos.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/device/vr/public/mojom/BUILD.gn
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/device/vr/public/mojom/vr_service.mojom
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/device/vr/vr_display_impl.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/device/vr/vr_display_impl.h
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/public/blink_typemaps.gni
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/public/platform/web_screen_info.h
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/renderer/modules/xr/DEPS
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/renderer/modules/xr/xr_frame_provider.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/renderer/modules/xr/xr_session.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/third_party/blink/tools/audit_non_blink_usage.py
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ui/display/display.cc
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ui/display/display.h
[modify] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ui/display/mojo/display.typemap
[add] https://crrev.com/5efab6814eaeef62c4a2b34ece221009badc6002/ui/display/mojo/display_rotation_for_blink.typemap

Owner: vollick@chromium.org
Status: Started (was: Untriaged)
Was this fixed by your CL Ian?
Components: Blink>WebXR
Components: -Blink>WebXR Blink>WebXR>AR
Labels: BlinkWebXR
Removing Blink>WebVR component and assigning to Blink>WebXR 
Components: Blink>WebXR
Labels: -BlinkWebXR
Removing Blink>WebVR component and assigning to Blink>WebXR 
Components: -Blink>WebVR
Labels: AR-Rendering
Cc: johnpallett@chromium.org
Owner: dougman@chromium.org
Status: Fixed (was: Started)
this sounds like it's fixed. marking as fixed, assigning to dougman@ to investigate what testing we're planning for AR.
Owner: lincolnfrog@chromium.org
Status: Assigned (was: Fixed)
Ian's CL did not address the original issue nor comment #2. Also, this bug is still referenced in a TODO: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/xr/xr_session.cc?type=cs&q=836948&sq=package:chromium&g=0&l=546

Sign in to add a comment