WebXR: Add dynamic viewport scaling support #25902
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for a per-view viewport scale factor, dynamically
configurable on a per-frame basis. The feature is controlled by the
WebXRViewportScale Blink feature, and can be enabled via
chrome://flags#webxr-incubations or the
--enable-features=WebXRIncubations command line flag.
See https://github.com/immersive-web/webxr/pull/1132/files
for the related spec changes.
This CL does not yet implement a recommended scale factor which is
an optional feature in the spec. The attribute just returns
base::nullopt for now.
In addition to the Blink experimental feature flag, the device backends
also need to opt in by setting XRSession.supports_viewport_scaling
via mojo response. Currently, only the GVR device enables the feature.
Bug: 1133381
Change-Id: I5ccf3fd613eb78475e1f4512025cc3eab6fd149d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438207
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812877}