Skip to content

Commit 31ee6ab

Browse files
author
commit-queue@webkit.org
committed
Rename XRWebGLLayer m_IscompositionDisabled to m_IscompositionEnabled
https://bugs.webkit.org/show_bug.cgi?id=221599 Patch by Imanol Fernandez <ifernandez@igalia.com> on 2021-02-09 Reviewed by Sergio Villar Senin. The spec agreed to rename this to avoid double negations in code. See immersive-web/webxr#1172. * Modules/webxr/WebXRWebGLLayer.cpp: (WebCore::WebXRWebGLLayer::create): (WebCore::WebXRWebGLLayer::WebXRWebGLLayer): * Modules/webxr/WebXRWebGLLayer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@272571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 09a0f2e commit 31ee6ab

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

Source/WebCore/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2021-02-09 Imanol Fernandez <ifernandez@igalia.com>
2+
3+
Rename XRWebGLLayer m_IscompositionDisabled to m_IscompositionEnabled
4+
https://bugs.webkit.org/show_bug.cgi?id=221599
5+
6+
Reviewed by Sergio Villar Senin.
7+
8+
The spec agreed to rename this to avoid double negations in code.
9+
See https://github.com/immersive-web/webxr/pull/1172.
10+
11+
* Modules/webxr/WebXRWebGLLayer.cpp:
12+
(WebCore::WebXRWebGLLayer::create):
13+
(WebCore::WebXRWebGLLayer::WebXRWebGLLayer):
14+
* Modules/webxr/WebXRWebGLLayer.h:
15+
116
2021-02-08 Rob Buis <rbuis@igalia.com>
217

318
Make auto && <ratio> use content box-sizing

Source/WebCore/Modules/webxr/WebXRWebGLLayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ExceptionOr<Ref<WebXRWebGLLayer>> WebXRWebGLLayer::create(Ref<WebXRSession>&& se
7474
// 9. (see constructor except for the resources initialization step which is handled in the if block below)
7575
auto layer = adoptRef(*new WebXRWebGLLayer(WTFMove(session), WTFMove(context), init));
7676

77-
if (!layer->m_isCompositionDisabled) {
77+
if (layer->m_isCompositionEnabled) {
7878
// 9.4. Allocate and initialize resources compatible with session’s XR device, including GPU accessible memory buffers,
7979
// as required to support the compositing of layer.
8080
// 9.5. If layer’s resources were unable to be created for any reason, throw an OperationError and abort these steps.
@@ -106,10 +106,10 @@ WebXRWebGLLayer::WebXRWebGLLayer(Ref<WebXRSession>&& session, WebXRRenderingCont
106106
// 8. Initialize layer's composition disabled boolean as follows:
107107
// If session is an inline session -> Initialize layer's composition disabled to true
108108
// Otherwise -> Initialize layer's composition disabled boolean to false
109-
m_isCompositionDisabled = m_session->mode() == XRSessionMode::Inline;
109+
m_isCompositionEnabled = m_session->mode() != XRSessionMode::Inline;
110110

111111
// 9. If layer’s composition disabled boolean is false:
112-
if (!m_isCompositionDisabled) {
112+
if (m_isCompositionEnabled) {
113113
// 1. Initialize layer’s antialias to layerInit’s antialias value.
114114
m_antialias = init.antialias;
115115

Source/WebCore/Modules/webxr/WebXRWebGLLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class WebXRWebGLLayer : public WebXRLayer {
8484
WebXRRenderingContext m_context;
8585
bool m_antialias { false };
8686
bool m_ignoreDepthValues { false };
87-
bool m_isCompositionDisabled { false };
87+
bool m_isCompositionEnabled { true };
8888

8989
struct {
9090
RefPtr<WebGLFramebuffer> object;

0 commit comments

Comments
 (0)