Skip to content

Commit b1a9ac1

Browse files
chromium-wpt-export-botMoe Ahmadi
and
Moe Ahmadi
authored
Revert "Enable "Immersive-AR" session for OpenXR runtime" (#26092)
This reverts commit 04ee981eb70e65020bbb0ab09c0f075946697269. Reason for revert: Breaking win-chrome See: https://ci.chromium.org/p/chrome/builders/ci/win-chrome/15856 Original change's description: > Enable "Immersive-AR" session for OpenXR runtime > > The OpenXR runtime on Windows supports both "opaque" (WMR VR devices) and "additive" (Hololens). This change simply turns on support for Immersive-AR session according to the WebXR AR-module spec. The majority of the change is to let the runtime to decide about the blend_mode and interaction_mode instead of the current guessing logic at at the renderer layer. > > Bug: 1069350, 944936 > Change-Id: Ie5f1b56857f9ca5357dbd1dde6585687773d0b56 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432759 > Commit-Queue: Phu Le <[email protected]> > Reviewed-by: Daniel Cheng <[email protected]> > Reviewed-by: Klaus Weidner <[email protected]> > Reviewed-by: Alexander Cooper <[email protected]> > Cr-Commit-Position: refs/heads/master@{#816352} [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] Change-Id: I0882e685902eb584ee2e417369a16697d21d1dfa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1069350 Bug: 944936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466997 Reviewed-by: Moe Ahmadi <[email protected]> Commit-Queue: Moe Ahmadi <[email protected]> Cr-Commit-Position: refs/heads/master@{#816382} Co-authored-by: Moe Ahmadi <[email protected]>
1 parent 646c6ef commit b1a9ac1

File tree

5 files changed

+5
-132
lines changed

5 files changed

+5
-132
lines changed

resources/chromium/webxr-test.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -341,17 +341,6 @@ class MockRuntime {
341341
"immersive-ar": device.mojom.XRSessionMode.kImmersiveAr,
342342
};
343343

344-
static environmentBlendModeToMojoMap = {
345-
"opaque": device.mojom.XREnvironmentBlendMode.kOpaque,
346-
"alpha-blend": device.mojom.XREnvironmentBlendMode.kAlphaBlend,
347-
"additive": device.mojom.XREnvironmentBlendMode.kAdditive,
348-
};
349-
350-
static interactionModeToMojoMap = {
351-
"screen-space": device.mojom.XRInteractionMode.kScreenSpace,
352-
"world-space": device.mojom.XRInteractionMode.kWorldSpace,
353-
};
354-
355344
constructor(fakeDeviceInit, service) {
356345
this.sessionClient_ = new device.mojom.XRSessionClientPtr();
357346
this.presentation_provider_ = new MockXRPresentationProvider();
@@ -430,8 +419,6 @@ class MockRuntime {
430419
}
431420

432421
this.defaultFramebufferScale_ = default_framebuffer_scale;
433-
this.enviromentBlendMode_ = this._convertBlendModeToEnum(fakeDeviceInit.environmentBlendMode);
434-
this.interactionMode_ = this._convertInteractionModeToEnum(fakeDeviceInit.interactionMode);
435422

436423
// This appropriately handles if the coordinates are null
437424
this.setBoundsGeometry(fakeDeviceInit.boundsCoordinates);
@@ -454,26 +441,6 @@ class MockRuntime {
454441
return sessionModes.map(mode => this._convertModeToEnum(mode));
455442
}
456443

457-
_convertBlendModeToEnum(blendMode) {
458-
if (blendMode in MockRuntime.environmentBlendModeToMojoMap) {
459-
return MockRuntime.environmentBlendModeToMojoMap[blendMode];
460-
} else {
461-
if (this.supportedModes_.includes(device.mojom.XRSessionMode.kImmersiveAr)) {
462-
return device.mojom.XREnvironmentBlendMode.kAdditive;
463-
} else if (this.supportedModes_.includes(device.mojom.XRSessionMode.kImmersiveVr)) {
464-
return device.mojom.XREnvironmentBlendMode.kOpaque;
465-
}
466-
}
467-
}
468-
469-
_convertInteractionModeToEnum(interactionMode) {
470-
if (interactionMode in MockRuntime.interactionModeToMojoMap) {
471-
return MockRuntime.interactionModeToMojoMap[interactionMode];
472-
} else {
473-
return device.mojom.XRInteractionMode.kWorldSpace;
474-
}
475-
}
476-
477444
// Test API methods.
478445
disconnect() {
479446
this.service_.removeRuntime(this);
@@ -1052,9 +1019,7 @@ class MockRuntime {
10521019
deviceConfig: {
10531020
defaultFramebufferScale: this.defaultFramebufferScale_,
10541021
supportsViewportScaling: true
1055-
},
1056-
enviromentBlendMode: this.enviromentBlendMode_,
1057-
interactionMode: this.interactionMode_
1022+
}
10581023
}
10591024
});
10601025
} else {

webxr/ar-module/xrSession_environmentBlendMode.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
assert_in_array(session.environmentBlendMode, ["opaque", "additive"]);
2222
}, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr', {});
2323
</script>
24-
</body>
24+
</body>

webxr/ar-module/xrSession_interactionMode.https.html

Lines changed: 0 additions & 84 deletions
This file was deleted.

webxr/dom-overlay/ar_dom_overlay.https.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
views: VALID_VIEWS,
4040
viewerOrigin: IDENTITY_TRANSFORM,
4141
supportedFeatures: ALL_FEATURES,
42-
environmentBlendMode: "alpha-blend",
43-
interactionMode: "screen-space"
4442
};
4543

4644
let testBasicProperties = function(overlayElement, session, fakeDeviceController, t) {

webxr/resources/webxr_test_constants.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,29 +132,23 @@ const TRACKED_IMMERSIVE_DEVICE = {
132132
supportedModes: [ "inline", "immersive-vr"],
133133
views: VALID_VIEWS,
134134
viewerOrigin: IDENTITY_TRANSFORM,
135-
supportedFeatures: ALL_FEATURES,
136-
environmentBlendMode: "opaque",
137-
interactionMode: "world-space"
135+
supportedFeatures: ALL_FEATURES
138136
};
139137

140138
const IMMERSIVE_AR_DEVICE = {
141139
supportsImmersive: true,
142140
supportedModes: [ "inline", "immersive-ar"],
143141
views: VALID_VIEWS,
144142
viewerOrigin: IDENTITY_TRANSFORM,
145-
supportedFeatures: ALL_FEATURES,
146-
environmentBlendMode: "additive",
147-
interactionMode: "screen-space"
143+
supportedFeatures: ALL_FEATURES
148144
};
149145

150146
const VALID_NON_IMMERSIVE_DEVICE = {
151147
supportsImmersive: false,
152148
supportedModes: ["inline"],
153149
views: NON_IMMERSIVE_VIEWS,
154150
viewerOrigin: IDENTITY_TRANSFORM,
155-
supportedFeatures: ALL_FEATURES,
156-
environmentBlendMode: "opaque",
157-
interactionMode: "screen-space"
151+
supportedFeatures: ALL_FEATURES
158152
};
159153

160154
const VALID_CONTROLLER = {

0 commit comments

Comments
 (0)