Commit 919a41dd authored by Brandon Jones's avatar Brandon Jones Committed by Commit Bot

Separate WebXR reflection cube map feature into it's own flag

This particular feature is moving more slowly than the rest of the
lighting features, so we'll want to be able to toggle it separately.

Bug: 1070819
Change-Id: I94af3008e347023d342296f0a96380139855b33d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252841Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781416}
parent 570fe6f2
......@@ -216,6 +216,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
{wf::EnableWebXRCameraAccess, features::kWebXrIncubations, kEnableOnly},
{wf::EnableWebXRLightEstimation, features::kWebXrIncubations, kEnableOnly},
{wf::EnableWebXRPlaneDetection, features::kWebXrIncubations, kEnableOnly},
{wf::EnableWebXRReflectionEstimation, features::kWebXrIncubations,
kEnableOnly},
{wf::EnableUserActivationPostMessageTransfer,
features::kUserActivationPostMessageTransfer, kUseFeatureState},
{wf::EnableUserActivationSameOriginVisibility,
......
......@@ -191,6 +191,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableWebXRHitTest(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRLightEstimation(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRPlaneDetection(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRReflectionEstimation(bool);
BLINK_PLATFORM_EXPORT static void EnableXSLT(bool);
BLINK_PLATFORM_EXPORT static void ForceOverlayFullscreenVideo(bool);
BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForBackgroundTabs(
......
......@@ -6,12 +6,12 @@
[
SecureContext,
Exposed=Window,
RuntimeEnabled=WebXRLightEstimation
RuntimeEnabled=WebXRReflectionEstimation
] interface XRWebGLBinding {
[RaisesException] constructor(XRSession session, XRWebGLRenderingContext context);
// Lighting Estimation API
[RaisesException]
[RuntimeEnabled=WebXRReflectionEstimation, RaisesException]
WebGLTexture? getReflectionCubeMap(XRLightProbe lightProbe);
[RuntimeEnabled=WebXRCameraAccess] WebGLTexture? getCameraImage(XRFrame frame, XRView view);
......
......@@ -483,6 +483,10 @@ void WebRuntimeFeatures::EnableWebXRPlaneDetection(bool enable) {
RuntimeEnabledFeatures::SetWebXRPlaneDetectionEnabled(enable);
}
void WebRuntimeFeatures::EnableWebXRReflectionEstimation(bool enable) {
RuntimeEnabledFeatures::SetWebXRReflectionEstimationEnabled(enable);
}
void WebRuntimeFeatures::EnablePresentationAPI(bool enable) {
RuntimeEnabledFeatures::SetPresentationEnabled(enable);
}
......
......@@ -2048,6 +2048,11 @@
depends_on: ["WebXRARModule"],
status: "experimental",
},
{
name: "WebXRReflectionEstimation",
depends_on: ["WebXRARModule", "WebXRLightEstimation"],
status: "experimental",
},
// Extends window placement functionality for multi-screen devices. Also
// exposes requisite information about displays connected to the device.
{
......
......@@ -91,7 +91,11 @@ function verifyXRLightEstimateExists(t, resolve, count, session, frame, lightPro
});
} else {
verifyXRLightEstimate(lightEstimate);
verifyReflectionCubeMap(session, lightProbe);
// Reflection cube maps may be enabled separately from the other lighting values.
if ('XRWebGLBinding' in window) {
verifyReflectionCubeMap(session, lightProbe);
}
// If the light probe is providing valid results it should also have a
// valid space.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment