Title: [248448] trunk
- Revision
- 248448
- Author
- [email protected]
- Date
- 2019-08-08 16:25:08 -0700 (Thu, 08 Aug 2019)
Log Message
Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
https://bugs.webkit.org/show_bug.cgi?id=200499
Source/WebCore:
Patch by Chris Lord <[email protected]> on 2019-08-08
Reviewed by Darin Adler.
This patch adds a shortcut when a framebuffer isn't bound on WebGL
canvases when retrieving ALPHA_BITS.
No new tests, covered by existing tests.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):
Return 0 for ALPHA_BITS if canvas has no alpha component.
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):
Return 0 for ALPHA_BITS if canvas has no alpha component.
LayoutTests:
Patch by Chris Lord <[email protected]> on 2019-08-08
Reviewed by Darin Adler.
* platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt:
1 more passing test.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (248447 => 248448)
--- trunk/LayoutTests/ChangeLog 2019-08-08 23:01:25 UTC (rev 248447)
+++ trunk/LayoutTests/ChangeLog 2019-08-08 23:25:08 UTC (rev 248448)
@@ -1,3 +1,13 @@
+2019-08-08 Chris Lord <[email protected]>
+
+ Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=200499
+
+ Reviewed by Darin Adler.
+
+ * platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt:
+ 1 more passing test.
+
2019-08-08 Devin Rousso <[email protected]>
Web Inspector: rename `queryObjects` to `queryInstances` for clarity
Modified: trunk/LayoutTests/platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt (248447 => 248448)
--- trunk/LayoutTests/platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt 2019-08-08 23:01:25 UTC (rev 248447)
+++ trunk/LayoutTests/platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt 2019-08-08 23:25:08 UTC (rev 248448)
@@ -19,7 +19,7 @@
[ 16: PASS ] should be 127,127,127,127
[ 17: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 18: PASS ] gl = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
-[ 19: FAIL ] gl.getParameter(gl.ALPHA_BITS) == 0 should be true. Was false.
+[ 19: PASS ] gl.getParameter(gl.ALPHA_BITS) == 0 is true
[ 20: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 21: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 22: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
@@ -104,5 +104,5 @@
[ 101: PASS ] redChannels[1] == 255 && redChannels[2] == 0 is true
[ 102: PASS ] redChannels[0] != 255 && redChannels[0] != 0 is contextAttribs.antialias
[ 103: PASS ] successfullyParsed is true
-[ FAIL ] 2 failures reported
+[ FAIL ] 1 failures reported
Modified: trunk/Source/WebCore/ChangeLog (248447 => 248448)
--- trunk/Source/WebCore/ChangeLog 2019-08-08 23:01:25 UTC (rev 248447)
+++ trunk/Source/WebCore/ChangeLog 2019-08-08 23:25:08 UTC (rev 248448)
@@ -1,3 +1,22 @@
+2019-08-08 Chris Lord <[email protected]>
+
+ Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=200499
+
+ Reviewed by Darin Adler.
+
+ This patch adds a shortcut when a framebuffer isn't bound on WebGL
+ canvases when retrieving ALPHA_BITS.
+
+ No new tests, covered by existing tests.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getParameter):
+ Return 0 for ALPHA_BITS if canvas has no alpha component.
+ * html/canvas/WebGL2RenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getParameter):
+ Return 0 for ALPHA_BITS if canvas has no alpha component.
+
2019-08-08 Chris Dumez <[email protected]>
ScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several threads
Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (248447 => 248448)
--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2019-08-08 23:01:25 UTC (rev 248447)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2019-08-08 23:25:08 UTC (rev 248448)
@@ -1771,6 +1771,8 @@
case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
return getWebGLFloatArrayParameter(pname);
case GraphicsContext3D::ALPHA_BITS:
+ if (!m_framebufferBinding && !m_attributes.alpha)
+ return 0;
return getIntParameter(pname);
case GraphicsContext3D::ARRAY_BUFFER_BINDING:
return m_boundArrayBuffer;
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (248447 => 248448)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2019-08-08 23:01:25 UTC (rev 248447)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2019-08-08 23:25:08 UTC (rev 248448)
@@ -421,6 +421,8 @@
case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
return getWebGLFloatArrayParameter(pname);
case GraphicsContext3D::ALPHA_BITS:
+ if (!m_framebufferBinding && !m_attributes.alpha)
+ return 0;
return getIntParameter(pname);
case GraphicsContext3D::ARRAY_BUFFER_BINDING:
return m_boundArrayBuffer;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes