https://bugs.webkit.org/show_bug.cgi?id=229267
<rdar://81855735>
Source/WebCore:
Patch by Kyle Piddington <kpiddington@apple.com> on 2021-08-19
Reviewed by Dean Jackson.
GraphicsContextGLAttributes defines 'useMetal' as 'true' by default.
Since this branch was only checking if Metal was enabled via the
setting, rather than checking the status of the flag, the metal backend
was never disabled, even when requested.
Tests: webgl/webgl-metal-disabled.html
webgl/webgl-metal-enabled.html
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* testing/Internals.cpp:
(WebCore::Internals::requestedMetal):
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.mm:
(WebCore::Internals::platformSupportsMetal):
LayoutTests:
Add tests to verify WebGL feature flag works as intended.
Patch by Kyle Piddington <kpiddington@apple.com> on 2021-08-19
Reviewed by Dean Jackson.
* webgl/webgl-metal-disabled-expected.txt: Added.
* webgl/webgl-metal-disabled.html: Added.
* webgl/webgl-metal-enabled-expected.txt: Added.
* webgl/webgl-metal-enabled.html: Added.
Canonical link: https://commits.webkit.org/240682@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281245 268f45cc-cd09-0410-ab3c-d52691b4dbfc