With GVR SDK 1.13, the horizontal and vertical rotation is swapped while in landscape magic window.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0a145e068815c78c7512144e5c18c901c18f456d commit 0a145e068815c78c7512144e5c18c901c18f456d Author: Michael Thiessen <mthiesse@chromium.org> Date: Thu Mar 01 23:50:00 2018 VR: Fix WebVR magic window poses with rotated device. Starting with gvr 1.13, GVR ignores the screen rotation and always delivers poses as though the phone was in portrait orientation. This CL applies the proper rotation to gvr-provided poses to account for the screen rotation. Bug: 817889 Change-Id: Ie705046439775b2a34d30b177db6191414acaa10 Reviewed-on: https://chromium-review.googlesource.com/944006 Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Bill Orr <billorr@chromium.org> Reviewed-by: Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/master@{#540353} [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/chrome/browser/android/vr/vr_shell_gl.cc [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/device/vr/android/gvr/gvr_delegate.cc [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/device/vr/android/gvr/gvr_delegate.h [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/device/vr/android/gvr/gvr_device.cc [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/device/vr/android/gvr/gvr_device.h [modify] https://crrev.com/0a145e068815c78c7512144e5c18c901c18f456d/device/vr/android/java/src/org/chromium/device/vr/NonPresentingGvrContext.java
GVR needs us to use a different fix here, as they may hotfix this which would lead to Chrome breaking.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea commit cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea Author: Michael Thiessen <mthiesse@chromium.org> Date: Tue Mar 06 18:30:53 2018 VR: Pause/Resume DisplaySynchronizer to handle device orientation Prior to GVR 1.13, the DisplaySynchronizer would start resumed, but with 1.13 this behaviour was changed. This lead to the DisplaySynchronizer not picking up orientation changes and WebVR being rotated in landscape. Bug: 817889 , 818750 Change-Id: I77202d2d0d7b6feb340483e87491e2b5c1009042 Reviewed-on: https://chromium-review.googlesource.com/951642 Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Biao She <bshe@chromium.org> Cr-Commit-Position: refs/heads/master@{#541154} [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/chrome/browser/android/vr/vr_shell_gl.cc [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/device/vr/android/gvr/gvr_delegate.cc [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/device/vr/android/gvr/gvr_delegate.h [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/device/vr/android/gvr/gvr_device.cc [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/device/vr/android/gvr/gvr_device.h [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/device/vr/android/java/src/org/chromium/device/vr/NonPresentingGvrContext.java [modify] https://crrev.com/cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea/third_party/gvr-android-sdk/display_synchronizer_jni.h
Verified on Canary
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff749f9882332d5a37c5d9f44847def95e4b6572 commit ff749f9882332d5a37c5d9f44847def95e4b6572 Author: Michael Thiessen <mthiesse@chromium.org> Date: Tue Mar 13 14:37:48 2018 VR: Fix WebVR magic window poses with rotated device. Starting with gvr 1.13, GVR ignores the screen rotation and always delivers poses as though the phone was in portrait orientation. This CL applies the proper rotation to gvr-provided poses to account for the screen rotation. TBR=mthiesse@chromium.org (cherry picked from commit 0a145e068815c78c7512144e5c18c901c18f456d) Bug: 817889 Change-Id: Ie705046439775b2a34d30b177db6191414acaa10 Reviewed-on: https://chromium-review.googlesource.com/944006 Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Bill Orr <billorr@chromium.org> Reviewed-by: Ian Vollick <vollick@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#540353} Reviewed-on: https://chromium-review.googlesource.com/960621 Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/branch-heads/3359@{#196} Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276} [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/chrome/browser/android/vr/vr_shell_gl.cc [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/device/vr/android/gvr/gvr_delegate.cc [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/device/vr/android/gvr/gvr_delegate.h [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/device/vr/android/gvr/gvr_device.cc [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/device/vr/android/gvr/gvr_device.h [modify] https://crrev.com/ff749f9882332d5a37c5d9f44847def95e4b6572/device/vr/android/java/src/org/chromium/device/vr/NonPresentingGvrContext.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f7cf4e0b43486fd153cc2922332f2eb7e89d111 commit 7f7cf4e0b43486fd153cc2922332f2eb7e89d111 Author: Michael Thiessen <mthiesse@chromium.org> Date: Tue Mar 13 14:42:06 2018 VR: Pause/Resume DisplaySynchronizer to handle device orientation Prior to GVR 1.13, the DisplaySynchronizer would start resumed, but with 1.13 this behaviour was changed. This lead to the DisplaySynchronizer not picking up orientation changes and WebVR being rotated in landscape. TBR=mthiesse@chromium.org (cherry picked from commit cd76e25bd1b55c41eb2024d20a4b7f9ea03203ea) Bug: 817889 , 818750 Change-Id: I77202d2d0d7b6feb340483e87491e2b5c1009042 Reviewed-on: https://chromium-review.googlesource.com/951642 Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Biao She <bshe@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#541154} Reviewed-on: https://chromium-review.googlesource.com/960584 Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/branch-heads/3359@{#197} Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276} [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/chrome/browser/android/vr/vr_shell_gl.cc [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/device/vr/android/gvr/gvr_delegate.cc [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/device/vr/android/gvr/gvr_delegate.h [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/device/vr/android/gvr/gvr_device.cc [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/device/vr/android/gvr/gvr_device.h [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/device/vr/android/java/src/org/chromium/device/vr/NonPresentingGvrContext.java [modify] https://crrev.com/7f7cf4e0b43486fd153cc2922332f2eb7e89d111/third_party/gvr-android-sdk/display_synchronizer_jni.h
Comment 1 by bugdroid1@chromium.org
, Mar 1 2018