WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Feb 2015 20:05:37 +0000 (20:05 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Feb 2015 20:05:37 +0000 (20:05 +0000)
commite2942cdde30a2c58a8174843826f0cd24c651dca
tree6c67470c2d1ed12fc610e36ac87ce06e9f0d31cc
parentff1e8145e5ed9cc18c35311268ee65253b1f6f14
WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
https://bugs.webkit.org/show_bug.cgi?id=141096
<rdar://problem/15002469>

Reviewed by Brent Fulgham.

This patch implements the WebGL2 versions of getParameter, getIndexedParameter and isEnabled.
It also removes the WebGL1 implementations from WebGLRenderingContextBase and moves it to WebGLRenderingContext.
I’ve stubbed out most of the parameters for now, some of which will be implemented in Part 2,
and the rest as the our WebGL2 implementation progresses.

* bindings/js/JSWebGL2RenderingContextCustom.cpp:
(WebCore::toJS):
(WebCore::JSWebGL2RenderingContext::getIndexedParameter):
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getIndexedParameter):
(WebCore::WebGL2RenderingContext::getParameter):
(WebCore::WebGL2RenderingContext::validateCapability):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::validateCapability):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::getParameter): Deleted.
(WebCore::WebGLRenderingContextBase::validateCapability): Deleted.
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:
* platform/graphics/GraphicsContext3D.h:
Two read format parameters were moved from the WebGL2 spec to the WebGL1 spec. Update tests accordingly.
* fast/canvas/webgl/constants.html:
* fast/canvas/webgl/webgl-specific-expected.txt:
* fast/canvas/webgl/webgl-specific.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/constants.html
LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt
LayoutTests/fast/canvas/webgl/webgl-specific.html
LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
Source/WebCore/platform/graphics/GraphicsContext3D.h