Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Aug 2019 23:25:08 +0000 (23:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Aug 2019 23:25:08 +0000 (23:25 +0000)
commit84ede3e68422647255655ce6d9ad33af518886d1
treeb65da8eeef5bceefb67a077d55de82ce74c8a318
parentd08815207a1bcc74f386ffbeb351156a274dae98
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 <clord@igalia.com> 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 <chrislord.net@gmail.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp