Disabling WebGL2 should mean no context is created
https://bugs.webkit.org/show_bug.cgi?id=157352
<rdar://problem/26096346>
Reviewed by Eric Carlson.
Source/WebCore:
If WebGL2 is disabled by the runtime flag, we should
not create a context.
Test: fast/canvas/webgl/webgl2-runtime-flag.html
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* testing/Internals.cpp: Added some helpers to toggle the runtime setting.
(WebCore::Internals::webGL2Enabled):
(WebCore::Internals::setWebGL2Enabled):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
Check that toggling the runtime flag enables/disables WebGL 2.0.
* fast/canvas/webgl/webgl2-runtime-flag-expected.txt: Added.
* fast/canvas/webgl/webgl2-runtime-flag.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed