Expose WEBGL_debug_renderer_info
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Oct 2015 01:09:42 +0000 (01:09 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Oct 2015 01:09:42 +0000 (01:09 +0000)
commitbd9b1f21734bd033e7698471ef12a6a8a6a7ed89
tree7279ade0c242fd1ea505da9846b31ba85d1838cf
parent527a82f6856bcdf6c51280acca41b2dde9b15712
Expose WEBGL_debug_renderer_info
https://bugs.webkit.org/show_bug.cgi?id=149735
<rdar://problem/18343500>

Reviewed by Simon Fraser.

Source/WebCore:

Enable the extension that allows content to query
for the GPUs vendor and details.

Now that we're enabling this, there was no need for
the internal setting that identified privileged situations.
However, since this meant that WEBGL_debug_shaders was
also exposed, I explicitly disable it since it is
not yet conformant.

Test: fast/canvas/webgl/webgl-debug-renderer-info.html
as well as the general conformance suite.

* html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContext.cpp: Ditto.
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
* html/canvas/WebGLRenderingContextBase.h:
* page/Settings.in: Remove privilegedWebGLExtensions.
* platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
extension while it is still buggy.
(WebCore::Extensions3DOpenGL::supportsExtension):

LayoutTests:

Modify a test from the 1.0.2 conformance suite to make sure
we're actually enabling and passing the info.

* fast/canvas/webgl/webgl-debug-renderer-info-expected.txt: Added.
* fast/canvas/webgl/webgl-debug-renderer-info.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/page/Settings.in
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp