<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[179482] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/179482">179482</a></dd>
<dt>Author</dt> <dd>roger_fong@apple.com</dd>
<dt>Date</dt> <dd>2015-02-02 12:05:37 -0800 (Mon, 02 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
https://bugs.webkit.org/show_bug.cgi?id=141096
&lt;rdar://problem/15002469&gt;

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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglconstantshtml">trunk/LayoutTests/fast/canvas/webgl/constants.html</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebglspecificexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebglspecifichtml">trunk/LayoutTests/fast/canvas/webgl/webgl-specific.html</a></li>
<li><a href="#trunkLayoutTestswebgl102resourceswebgl_test_filesconformancemiscwebglspecifichtml">trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGL2RenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContexth">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh">trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/LayoutTests/ChangeLog        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-01-30  Roger Fong  &lt;roger_fong@apple.com&gt;
+
+        WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
+        https://bugs.webkit.org/show_bug.cgi?id=141096
+        &lt;rdar://problem/15002469&gt;
+
+        Reviewed by Brent Fulgham.
+
+        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:
+
</ins><span class="cx"> 2015-02-02  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] ASSERTION FAILED: m_scriptExecutionContext-&gt;isContextThread() in ContextDestructionObserver::observeContext
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglconstantshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/constants.html (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/constants.html        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/LayoutTests/fast/canvas/webgl/constants.html        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -370,6 +370,10 @@
</span><span class="cx"> VERTEX_ATTRIB_ARRAY_POINTER        : 0x8645,
</span><span class="cx"> VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
</span><span class="cx">     
</span><ins>+    /* Read Format */
+IMPLEMENTATION_COLOR_READ_TYPE     : 0x8B9A,
+IMPLEMENTATION_COLOR_READ_FORMAT   : 0x8B9B,
+
</ins><span class="cx">     /* Shader Source */
</span><span class="cx"> COMPILE_STATUS                 : 0x8B81,
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebglspecificexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -43,10 +43,6 @@
</span><span class="cx"> PASS gl.stencilFuncSeparate(gl.FRONT, gl.ALWAYS, 1, 1) generated expected GL error: NO_ERROR.
</span><span class="cx"> PASS gl.drawArrays(gl.TRIANGLES, 0, 0) generated expected GL error: NO_ERROR.
</span><span class="cx"> 
</span><del>-Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are undefined
-PASS undefined is undefined.
-PASS undefined is undefined.
-
</del><span class="cx"> Verify that *LENGTH are undefined
</span><span class="cx"> PASS undefined is undefined.
</span><span class="cx"> PASS undefined is undefined.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebglspecifichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/webgl-specific.html (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-specific.html        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-specific.html        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -71,11 +71,6 @@
</span><span class="cx"> shouldGenerateGLError(gl, gl.NO_ERROR, &quot;gl.drawArrays(gl.TRIANGLES, 0, 0)&quot;);
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><del>-debug(&quot;Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are undefined&quot;);
-shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
-shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_TYPE);
-
-debug(&quot;&quot;);
</del><span class="cx"> debug(&quot;Verify that *LENGTH are undefined&quot;);
</span><span class="cx"> shouldBeUndefined(gl.INFO_LOG_LENGTH);
</span><span class="cx"> shouldBeUndefined(gl.SHADER_SOURCE_LENGTH);
</span></span></pre></div>
<a id="trunkLayoutTestswebgl102resourceswebgl_test_filesconformancemiscwebglspecifichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -97,11 +97,6 @@
</span><span class="cx"> shouldGenerateGLError(gl, gl.NO_ERROR, &quot;gl.drawArrays(gl.TRIANGLES, 0, 0)&quot;);
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><del>-debug(&quot;Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are undefined&quot;);
-shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
-shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_TYPE);
-
-debug(&quot;&quot;);
</del><span class="cx"> debug(&quot;Verify that *LENGTH are undefined&quot;);
</span><span class="cx"> shouldBeUndefined(gl.INFO_LOG_LENGTH);
</span><span class="cx"> shouldBeUndefined(gl.SHADER_SOURCE_LENGTH);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/ChangeLog        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-01-30  Roger Fong  &lt;roger_fong@apple.com&gt;
+
+        WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
+        https://bugs.webkit.org/show_bug.cgi?id=141096
+        &lt;rdar://problem/15002469&gt;
+
+        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:
+
</ins><span class="cx"> 2015-02-02  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] ASSERTION FAILED: m_scriptExecutionContext-&gt;isContextThread() in ContextDestructionObserver::observeContext
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGL2RenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -28,10 +28,41 @@
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> #include &quot;JSWebGL2RenderingContext.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;NotImplemented.h&quot;
+#include &quot;WebGL2RenderingContext.h&quot;
+
</ins><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
</del><ins>+
+static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, const WebGLGetInfo&amp; info)
+{
+    switch (info.getType()) {
+    case WebGLGetInfo::kTypeBool:
+        return jsBoolean(info.getBool());
+    case WebGLGetInfo::kTypeBoolArray: {
+        MarkedArgumentBuffer list;
+        const auto&amp; values = info.getBoolArray();
+        for (const auto&amp; value : values)
+            list.append(jsBoolean(value));
+        return constructArray(exec, 0, globalObject, list);
+    }
+    case WebGLGetInfo::kTypeFloat:
+        return jsNumber(info.getFloat());
+    case WebGLGetInfo::kTypeInt:
+        return jsNumber(info.getInt());
+    case WebGLGetInfo::kTypeNull:
+        return jsNull();
+    case WebGLGetInfo::kTypeString:
+        return jsStringWithCache(exec, info.getString());
+    case WebGLGetInfo::kTypeUnsignedInt:
+        return jsNumber(info.getUnsignedInt());
+    default:
+        notImplemented();
+        return jsUndefined();
+    }
+}
+
</ins><span class="cx"> void JSWebGL2RenderingContext::visitAdditionalChildren(SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><span class="cx">     visitor.addOpaqueRoot(&amp;impl());
</span><span class="lines">@@ -69,8 +100,18 @@
</span><span class="cx"> 
</span><span class="cx"> JSValue JSWebGL2RenderingContext::getIndexedParameter(ExecState* exec)
</span><span class="cx"> {
</span><del>-    UNUSED_PARAM(exec);
-    return jsUndefined();
</del><ins>+    if (exec-&gt;argumentCount() != 2)
+        return exec-&gt;vm().throwException(exec, createNotEnoughArgumentsError(exec));
+
+    WebGL2RenderingContext&amp; context = impl();
+    unsigned pname = exec-&gt;uncheckedArgument(0).toInt32(exec);
+    if (exec-&gt;hadException())
+        return jsUndefined();
+    unsigned index = exec-&gt;uncheckedArgument(1).toInt32(exec);
+    if (exec-&gt;hadException())
+        return jsUndefined();
+    WebGLGetInfo info = context.getIndexedParameter(pname, index);
+    return toJS(exec, globalObject(), info);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSWebGL2RenderingContext::getActiveUniformBlockParameter(ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -695,6 +695,20 @@
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(target);
</span><span class="cx">     UNUSED_PARAM(index);
</span><ins>+    switch (target) {
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_SIZE:
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_START:
+    case GraphicsContext3D::UNIFORM_BUFFER_BINDING:
+    case GraphicsContext3D::UNIFORM_BUFFER_SIZE:
+    case GraphicsContext3D::UNIFORM_BUFFER_START:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getIndexedParameter&quot;, &quot;parameter name not yet supported&quot;);
+        return WebGLGetInfo();
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getIndexedParameter&quot;, &quot;invalid parameter name&quot;);
+        return WebGLGetInfo();
+            
+    }
</ins><span class="cx">     return WebGLGetInfo();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -886,6 +900,305 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebGLGetInfo WebGL2RenderingContext::getParameter(GC3Denum pname, ExceptionCode&amp; ec)
+{
+    UNUSED_PARAM(ec);
+    if (isContextLostOrPending())
+        return WebGLGetInfo();
+    const int intZero = 0;
+    switch (pname) {
+    case GraphicsContext3D::ACTIVE_TEXTURE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::ALIASED_LINE_WIDTH_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::ALPHA_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::ARRAY_BUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundArrayBuffer));
+    case GraphicsContext3D::BLEND:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::BLEND_COLOR:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::BLEND_DST_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_DST_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_EQUATION_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_EQUATION_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_SRC_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_SRC_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLUE_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::COLOR_CLEAR_VALUE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::COLOR_WRITEMASK:
+        return getBooleanArrayParameter(pname);
+    case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS:
+        return WebGLGetInfo(Uint32Array::create(m_compressedTextureFormats.data(), m_compressedTextureFormats.size()));
+    case GraphicsContext3D::CULL_FACE:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::CULL_FACE_MODE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::CURRENT_PROGRAM:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLProgram&gt;(m_currentProgram));
+    case GraphicsContext3D::DEPTH_BITS:
+        if (!m_framebufferBinding &amp;&amp; !m_attributes.depth)
+            return WebGLGetInfo(intZero);
+        return getIntParameter(pname);
+    case GraphicsContext3D::DEPTH_CLEAR_VALUE:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::DEPTH_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::DEPTH_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::DEPTH_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::DEPTH_WRITEMASK:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::DITHER:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundVertexArrayObject-&gt;getElementArrayBuffer()));
+    case GraphicsContext3D::FRAMEBUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLFramebuffer&gt;(m_framebufferBinding));
+    case GraphicsContext3D::FRONT_FACE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::GREEN_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_FORMAT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_TYPE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::LINE_WIDTH:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_RENDERBUFFER_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_TEXTURE_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VARYING_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_ATTRIBS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_UNIFORM_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VIEWPORT_DIMS:
+        return getWebGLIntArrayParameter(pname);
+    case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::PACK_ALIGNMENT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_FACTOR:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_FILL:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_UNITS:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::RED_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::RENDERBUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLRenderbuffer&gt;(m_renderbufferBinding));
+    case GraphicsContext3D::RENDERER:
+        return WebGLGetInfo(String(&quot;WebKit WebGL&quot;));
+    case GraphicsContext3D::SAMPLE_BUFFERS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::SAMPLE_COVERAGE_INVERT:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::SAMPLE_COVERAGE_VALUE:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::SAMPLES:
+        return getIntParameter(pname);
+    case GraphicsContext3D::SCISSOR_BOX:
+        return getWebGLIntArrayParameter(pname);
+    case GraphicsContext3D::SCISSOR_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::SHADING_LANGUAGE_VERSION:
+        return WebGLGetInfo(&quot;WebGL GLSL ES 1.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::SHADING_LANGUAGE_VERSION) + &quot;)&quot;);
+    case GraphicsContext3D::STENCIL_BACK_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_PASS:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_REF:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_VALUE_MASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_WRITEMASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BITS:
+        if (!m_framebufferBinding &amp;&amp; !m_attributes.stencil)
+            return WebGLGetInfo(intZero);
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_CLEAR_VALUE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_PASS_DEPTH_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_PASS_DEPTH_PASS:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_REF:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::STENCIL_VALUE_MASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_WRITEMASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::SUBPIXEL_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::TEXTURE_BINDING_2D:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].texture2DBinding));
+    case GraphicsContext3D::TEXTURE_BINDING_CUBE_MAP:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].textureCubeMapBinding));
+    case GraphicsContext3D::UNPACK_ALIGNMENT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL:
+        return WebGLGetInfo(m_unpackFlipY);
+    case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
+        return WebGLGetInfo(m_unpackPremultiplyAlpha);
+    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
+        return WebGLGetInfo(m_unpackColorspaceConversion);
+    case GraphicsContext3D::VENDOR:
+        return WebGLGetInfo(String(&quot;WebKit&quot;));
+    case GraphicsContext3D::VERSION:
+        return WebGLGetInfo(&quot;WebGL 2.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::VERSION) + &quot;)&quot;);
+    case GraphicsContext3D::VIEWPORT:
+        return getWebGLIntArrayParameter(pname);
+    case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL:
+        if (m_webglDebugRendererInfo)
+            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::RENDERER));
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
+        return WebGLGetInfo();
+    case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL:
+        if (m_webglDebugRendererInfo)
+            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::VENDOR));
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
+        return WebGLGetInfo();
+    case Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT: // EXT_texture_filter_anisotropic
+        if (m_extTextureFilterAnisotropic)
+            return getUnsignedIntParameter(Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT);
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_texture_filter_anisotropic not enabled&quot;);
+        return WebGLGetInfo();
+    case GraphicsContext3D::COPY_READ_BUFFER:
+    case GraphicsContext3D::COPY_WRITE_BUFFER:
+    case GraphicsContext3D::DRAW_BUFFER0:
+    case GraphicsContext3D::DRAW_BUFFER1:
+    case GraphicsContext3D::DRAW_BUFFER2:
+    case GraphicsContext3D::DRAW_BUFFER3:
+    case GraphicsContext3D::DRAW_BUFFER4:
+    case GraphicsContext3D::DRAW_BUFFER5:
+    case GraphicsContext3D::DRAW_BUFFER6:
+    case GraphicsContext3D::DRAW_BUFFER7:
+    case GraphicsContext3D::DRAW_BUFFER8:
+    case GraphicsContext3D::DRAW_BUFFER9:
+    case GraphicsContext3D::DRAW_BUFFER10:
+    case GraphicsContext3D::DRAW_BUFFER11:
+    case GraphicsContext3D::DRAW_BUFFER12:
+    case GraphicsContext3D::DRAW_BUFFER13:
+    case GraphicsContext3D::DRAW_BUFFER14:
+    case GraphicsContext3D::DRAW_BUFFER15:
+    case GraphicsContext3D::FRAGMENT_SHADER_DERIVATIVE_HINT:
+    case GraphicsContext3D::MAX_3D_TEXTURE_SIZE:
+    case GraphicsContext3D::MAX_ARRAY_TEXTURE_LAYERS:
+    case GraphicsContext3D::MAX_COLOR_ATTACHMENTS:
+    case GraphicsContext3D::MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
+    case GraphicsContext3D::MAX_COMBINED_UNIFORM_BLOCKS:
+    case GraphicsContext3D::MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:
+    case GraphicsContext3D::MAX_DRAW_BUFFERS:
+    case GraphicsContext3D::MAX_ELEMENT_INDEX:
+    case GraphicsContext3D::MAX_ELEMENTS_INDICES:
+    case GraphicsContext3D::MAX_ELEMENTS_VERTICES:
+    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_COMPONENTS:
+    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_BLOCKS:
+    case GraphicsContext3D::MAX_PROGRAM_TEXEL_OFFSET:
+    case GraphicsContext3D::MAX_SAMPLES:
+    case GraphicsContext3D::MAX_SERVER_WAIT_TIMEOUT:
+    case GraphicsContext3D::MAX_TEXTURE_LOD_BIAS:
+    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:
+    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:
+    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:
+    case GraphicsContext3D::MAX_UNIFORM_BLOCK_SIZE:
+    case GraphicsContext3D::MAX_UNIFORM_BUFFER_BINDINGS:
+    case GraphicsContext3D::MAX_VARYING_COMPONENTS:
+    case GraphicsContext3D::MAX_VERTEX_OUTPUT_COMPONENTS:
+    case GraphicsContext3D::MAX_VERTEX_UNIFORM_BLOCKS:
+    case GraphicsContext3D::MAX_VERTEX_UNIFORM_COMPONENTS:                             
+    case GraphicsContext3D::MIN_PROGRAM_TEXEL_OFFSET:
+    case GraphicsContext3D::PACK_ROW_LENGTH:
+    case GraphicsContext3D::PACK_SKIP_PIXELS:
+    case GraphicsContext3D::PACK_SKIP_ROWS:
+    case GraphicsContext3D::PIXEL_PACK_BUFFER_BINDING:   
+    case GraphicsContext3D::PIXEL_UNPACK_BUFFER_BINDING:
+    case GraphicsContext3D::RASTERIZER_DISCARD:
+    case GraphicsContext3D::READ_BUFFER:
+    case GraphicsContext3D::READ_FRAMEBUFFER_BINDING:
+    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
+    case GraphicsContext3D::SAMPLE_COVERAGE:
+    case GraphicsContext3D::SAMPLER_BINDING:
+    case GraphicsContext3D::TEXTURE_BINDING_2D_ARRAY:
+    case GraphicsContext3D::TEXTURE_BINDING_3D:
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_ACTIVE:
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+    case GraphicsContext3D::TRANSFORM_FEEDBACK_PAUSED:
+    case GraphicsContext3D::UNIFORM_BUFFER_BINDING:
+    case GraphicsContext3D::UNIFORM_BUFFER_OFFSET_ALIGNMENT:
+    case GraphicsContext3D::UNPACK_IMAGE_HEIGHT:
+    case GraphicsContext3D::UNPACK_ROW_LENGTH:
+    case GraphicsContext3D::UNPACK_SKIP_IMAGES:
+    case GraphicsContext3D::UNPACK_SKIP_PIXELS:
+    case GraphicsContext3D::UNPACK_SKIP_ROWS:
+    case GraphicsContext3D::VERTEX_ARRAY_BINDING:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;parameter name not yet supported&quot;);
+        return WebGLGetInfo();
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name&quot;);
+        return WebGLGetInfo();
+    }
+}
+
+bool WebGL2RenderingContext::validateCapability(const char* functionName, GC3Denum cap)
+{
+    switch (cap) {
+    case GraphicsContext3D::BLEND:
+    case GraphicsContext3D::CULL_FACE:
+    case GraphicsContext3D::DEPTH_TEST:
+    case GraphicsContext3D::DITHER:
+    case GraphicsContext3D::POLYGON_OFFSET_FILL:
+    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
+    case GraphicsContext3D::SAMPLE_COVERAGE:
+    case GraphicsContext3D::SCISSOR_TEST:
+    case GraphicsContext3D::STENCIL_TEST:
+    case GraphicsContext3D::RASTERIZER_DISCARD:
+        return true;
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, &quot;invalid capability&quot;);
+        return false;
+    }
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -167,6 +167,9 @@
</span><span class="cx">     /* Extensions */
</span><span class="cx">     virtual WebGLExtension* getExtension(const String&amp;) override;
</span><span class="cx">     virtual Vector&lt;String&gt; getSupportedExtensions() override;
</span><ins>+
+    virtual WebGLGetInfo getParameter(GC3Denum pname, ExceptionCode&amp;) override;
+    bool validateCapability(const char* functionName, GC3Denum cap) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -281,6 +281,266 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebGLGetInfo WebGLRenderingContext::getParameter(GC3Denum pname, ExceptionCode&amp; ec)
+{
+    UNUSED_PARAM(ec);
+    if (isContextLostOrPending())
+        return WebGLGetInfo();
+    const int intZero = 0;
+    switch (pname) {
+    case GraphicsContext3D::ACTIVE_TEXTURE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::ALIASED_LINE_WIDTH_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::ALPHA_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::ARRAY_BUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundArrayBuffer));
+    case GraphicsContext3D::BLEND:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::BLEND_COLOR:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::BLEND_DST_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_DST_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_EQUATION_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_EQUATION_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_SRC_ALPHA:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLEND_SRC_RGB:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::BLUE_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::COLOR_CLEAR_VALUE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::COLOR_WRITEMASK:
+        return getBooleanArrayParameter(pname);
+    case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS:
+        return WebGLGetInfo(Uint32Array::create(m_compressedTextureFormats.data(), m_compressedTextureFormats.size()));
+    case GraphicsContext3D::CULL_FACE:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::CULL_FACE_MODE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::CURRENT_PROGRAM:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLProgram&gt;(m_currentProgram));
+    case GraphicsContext3D::DEPTH_BITS:
+        if (!m_framebufferBinding &amp;&amp; !m_attributes.depth)
+            return WebGLGetInfo(intZero);
+        return getIntParameter(pname);
+    case GraphicsContext3D::DEPTH_CLEAR_VALUE:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::DEPTH_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::DEPTH_RANGE:
+        return getWebGLFloatArrayParameter(pname);
+    case GraphicsContext3D::DEPTH_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::DEPTH_WRITEMASK:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::DITHER:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundVertexArrayObject-&gt;getElementArrayBuffer()));
+    case GraphicsContext3D::FRAMEBUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLFramebuffer&gt;(m_framebufferBinding));
+    case GraphicsContext3D::FRONT_FACE:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::GREEN_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_FORMAT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_TYPE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::LINE_WIDTH:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_RENDERBUFFER_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_TEXTURE_SIZE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VARYING_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_ATTRIBS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_TEXTURE_IMAGE_UNITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VERTEX_UNIFORM_VECTORS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::MAX_VIEWPORT_DIMS:
+        return getWebGLIntArrayParameter(pname);
+    case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::PACK_ALIGNMENT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_FACTOR:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_FILL:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::POLYGON_OFFSET_UNITS:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::RED_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::RENDERBUFFER_BINDING:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLRenderbuffer&gt;(m_renderbufferBinding));
+    case GraphicsContext3D::RENDERER:
+        return WebGLGetInfo(String(&quot;WebKit WebGL&quot;));
+    case GraphicsContext3D::SAMPLE_BUFFERS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::SAMPLE_COVERAGE_INVERT:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::SAMPLE_COVERAGE_VALUE:
+        return getFloatParameter(pname);
+    case GraphicsContext3D::SAMPLES:
+        return getIntParameter(pname);
+    case GraphicsContext3D::SCISSOR_BOX:
+        return getWebGLIntArrayParameter(pname);
+    case GraphicsContext3D::SCISSOR_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::SHADING_LANGUAGE_VERSION:
+        return WebGLGetInfo(&quot;WebGL GLSL ES 1.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::SHADING_LANGUAGE_VERSION) + &quot;)&quot;);
+    case GraphicsContext3D::STENCIL_BACK_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_PASS:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_REF:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_VALUE_MASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BACK_WRITEMASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_BITS:
+        if (!m_framebufferBinding &amp;&amp; !m_attributes.stencil)
+            return WebGLGetInfo(intZero);
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_CLEAR_VALUE:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_FUNC:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_PASS_DEPTH_FAIL:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_PASS_DEPTH_PASS:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_REF:
+        return getIntParameter(pname);
+    case GraphicsContext3D::STENCIL_TEST:
+        return getBooleanParameter(pname);
+    case GraphicsContext3D::STENCIL_VALUE_MASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::STENCIL_WRITEMASK:
+        return getUnsignedIntParameter(pname);
+    case GraphicsContext3D::SUBPIXEL_BITS:
+        return getIntParameter(pname);
+    case GraphicsContext3D::TEXTURE_BINDING_2D:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].texture2DBinding));
+    case GraphicsContext3D::TEXTURE_BINDING_CUBE_MAP:
+        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].textureCubeMapBinding));
+    case GraphicsContext3D::UNPACK_ALIGNMENT:
+        return getIntParameter(pname);
+    case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL:
+        return WebGLGetInfo(m_unpackFlipY);
+    case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
+        return WebGLGetInfo(m_unpackPremultiplyAlpha);
+    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
+        return WebGLGetInfo(m_unpackColorspaceConversion);
+    case GraphicsContext3D::VENDOR:
+        return WebGLGetInfo(String(&quot;WebKit&quot;));
+    case GraphicsContext3D::VERSION:
+        return WebGLGetInfo(&quot;WebGL 1.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::VERSION) + &quot;)&quot;);
+    case GraphicsContext3D::VIEWPORT:
+        return getWebGLIntArrayParameter(pname);
+    case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
+        if (m_oesStandardDerivatives)
+            return getUnsignedIntParameter(Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, OES_standard_derivatives not enabled&quot;);
+        return WebGLGetInfo();
+    case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL:
+        if (m_webglDebugRendererInfo)
+            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::RENDERER));
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
+        return WebGLGetInfo();
+    case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL:
+        if (m_webglDebugRendererInfo)
+            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::VENDOR));
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
+        return WebGLGetInfo();
+    case Extensions3D::VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object
+        if (m_oesVertexArrayObject) {
+            if (!m_boundVertexArrayObject-&gt;isDefaultObject())
+                return WebGLGetInfo(PassRefPtr&lt;WebGLVertexArrayObjectOES&gt;(m_boundVertexArrayObject));
+            return WebGLGetInfo();
+        }
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, OES_vertex_array_object not enabled&quot;);
+        return WebGLGetInfo();
+    case Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT: // EXT_texture_filter_anisotropic
+        if (m_extTextureFilterAnisotropic)
+            return getUnsignedIntParameter(Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT);
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_texture_filter_anisotropic not enabled&quot;);
+        return WebGLGetInfo();
+    case Extensions3D::MAX_COLOR_ATTACHMENTS_EXT: // EXT_draw_buffers BEGIN
+        if (m_webglDrawBuffers)
+            return WebGLGetInfo(getMaxColorAttachments());
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
+        return WebGLGetInfo();
+    case Extensions3D::MAX_DRAW_BUFFERS_EXT:
+        if (m_webglDrawBuffers)
+            return WebGLGetInfo(getMaxDrawBuffers());
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
+        return WebGLGetInfo();
+    default:
+        if (m_webglDrawBuffers
+            &amp;&amp; pname &gt;= Extensions3D::DRAW_BUFFER0_EXT
+            &amp;&amp; pname &lt; static_cast&lt;GC3Denum&gt;(Extensions3D::DRAW_BUFFER0_EXT + getMaxDrawBuffers())) {
+            GC3Dint value = GraphicsContext3D::NONE;
+            if (m_framebufferBinding)
+                value = m_framebufferBinding-&gt;getDrawBuffer(pname);
+            else // emulated backbuffer
+                value = m_backDrawBuffer;
+            return WebGLGetInfo(value);
+        }
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name&quot;);
+        return WebGLGetInfo();
+    }
+}
+
+bool WebGLRenderingContext::validateCapability(const char* functionName, GC3Denum cap)
+{
+    switch (cap) {
+    case GraphicsContext3D::BLEND:
+    case GraphicsContext3D::CULL_FACE:
+    case GraphicsContext3D::DEPTH_TEST:
+    case GraphicsContext3D::DITHER:
+    case GraphicsContext3D::POLYGON_OFFSET_FILL:
+    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
+    case GraphicsContext3D::SAMPLE_COVERAGE:
+    case GraphicsContext3D::SCISSOR_TEST:
+    case GraphicsContext3D::STENCIL_TEST:
+        return true;
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, &quot;invalid capability&quot;);
+        return false;
+    }
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -37,7 +37,9 @@
</span><span class="cx">     virtual bool isWebGL1() const { return true; }
</span><span class="cx">     
</span><span class="cx">     virtual WebGLExtension* getExtension(const String&amp;) override;
</span><ins>+    virtual WebGLGetInfo getParameter(GC3Denum pname, ExceptionCode&amp;) override;
</ins><span class="cx">     virtual Vector&lt;String&gt; getSupportedExtensions() override;
</span><ins>+    bool validateCapability(const char* functionName, GC3Denum cap) override;
</ins><span class="cx"> };
</span><span class="cx">     
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -2680,244 +2680,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebGLGetInfo WebGLRenderingContextBase::getParameter(GC3Denum pname, ExceptionCode&amp; ec)
-{
-    UNUSED_PARAM(ec);
-    if (isContextLostOrPending())
-        return WebGLGetInfo();
-    const int intZero = 0;
-    switch (pname) {
-    case GraphicsContext3D::ACTIVE_TEXTURE:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::ALIASED_LINE_WIDTH_RANGE:
-        return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
-        return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALPHA_BITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::ARRAY_BUFFER_BINDING:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundArrayBuffer));
-    case GraphicsContext3D::BLEND:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::BLEND_COLOR:
-        return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::BLEND_DST_ALPHA:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_DST_RGB:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_ALPHA:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_RGB:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_ALPHA:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_RGB:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLUE_BITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::COLOR_CLEAR_VALUE:
-        return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::COLOR_WRITEMASK:
-        return getBooleanArrayParameter(pname);
-    case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS:
-        return WebGLGetInfo(Uint32Array::create(m_compressedTextureFormats.data(), m_compressedTextureFormats.size()));
-    case GraphicsContext3D::CULL_FACE:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::CULL_FACE_MODE:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::CURRENT_PROGRAM:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLProgram&gt;(m_currentProgram));
-    case GraphicsContext3D::DEPTH_BITS:
-        if (!m_framebufferBinding &amp;&amp; !m_attributes.depth)
-            return WebGLGetInfo(intZero);
-        return getIntParameter(pname);
-    case GraphicsContext3D::DEPTH_CLEAR_VALUE:
-        return getFloatParameter(pname);
-    case GraphicsContext3D::DEPTH_FUNC:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::DEPTH_RANGE:
-        return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::DEPTH_TEST:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::DEPTH_WRITEMASK:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::DITHER:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER_BINDING:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLBuffer&gt;(m_boundVertexArrayObject-&gt;getElementArrayBuffer()));
-    case GraphicsContext3D::FRAMEBUFFER_BINDING:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLFramebuffer&gt;(m_framebufferBinding));
-    case GraphicsContext3D::FRONT_FACE:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GREEN_BITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::LINE_WIDTH:
-        return getFloatParameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_RENDERBUFFER_SIZE:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TEXTURE_IMAGE_UNITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TEXTURE_SIZE:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VARYING_VECTORS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_ATTRIBS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_TEXTURE_IMAGE_UNITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_UNIFORM_VECTORS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VIEWPORT_DIMS:
-        return getWebGLIntArrayParameter(pname);
-    case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS:
-        // FIXME: should we always return 0 for this?
-        return getIntParameter(pname);
-    case GraphicsContext3D::PACK_ALIGNMENT:
-        return getIntParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_FACTOR:
-        return getFloatParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_FILL:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_UNITS:
-        return getFloatParameter(pname);
-    case GraphicsContext3D::RED_BITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::RENDERBUFFER_BINDING:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLRenderbuffer&gt;(m_renderbufferBinding));
-    case GraphicsContext3D::RENDERER:
-        return WebGLGetInfo(String(&quot;WebKit WebGL&quot;));
-    case GraphicsContext3D::SAMPLE_BUFFERS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::SAMPLE_COVERAGE_INVERT:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::SAMPLE_COVERAGE_VALUE:
-        return getFloatParameter(pname);
-    case GraphicsContext3D::SAMPLES:
-        return getIntParameter(pname);
-    case GraphicsContext3D::SCISSOR_BOX:
-        return getWebGLIntArrayParameter(pname);
-    case GraphicsContext3D::SCISSOR_TEST:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::SHADING_LANGUAGE_VERSION:
-        return WebGLGetInfo(&quot;WebGL GLSL ES 1.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::SHADING_LANGUAGE_VERSION) + &quot;)&quot;);
-    case GraphicsContext3D::STENCIL_BACK_FAIL:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_FUNC:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_FAIL:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_PASS:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_REF:
-        return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_VALUE_MASK:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_WRITEMASK:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BITS:
-        if (!m_framebufferBinding &amp;&amp; !m_attributes.stencil)
-            return WebGLGetInfo(intZero);
-        return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_CLEAR_VALUE:
-        return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_FAIL:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_FUNC:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_PASS_DEPTH_FAIL:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_PASS_DEPTH_PASS:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_REF:
-        return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_TEST:
-        return getBooleanParameter(pname);
-    case GraphicsContext3D::STENCIL_VALUE_MASK:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_WRITEMASK:
-        return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::SUBPIXEL_BITS:
-        return getIntParameter(pname);
-    case GraphicsContext3D::TEXTURE_BINDING_2D:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].texture2DBinding));
-    case GraphicsContext3D::TEXTURE_BINDING_CUBE_MAP:
-        return WebGLGetInfo(PassRefPtr&lt;WebGLTexture&gt;(m_textureUnits[m_activeTextureUnit].textureCubeMapBinding));
-    case GraphicsContext3D::UNPACK_ALIGNMENT:
-        return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL:
-        return WebGLGetInfo(m_unpackFlipY);
-    case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
-        return WebGLGetInfo(m_unpackPremultiplyAlpha);
-    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
-        return WebGLGetInfo(m_unpackColorspaceConversion);
-    case GraphicsContext3D::VENDOR:
-        return WebGLGetInfo(String(&quot;WebKit&quot;));
-    case GraphicsContext3D::VERSION:
-        return WebGLGetInfo(&quot;WebGL 1.0 (&quot; + m_context-&gt;getString(GraphicsContext3D::VERSION) + &quot;)&quot;);
-    case GraphicsContext3D::VIEWPORT:
-        return getWebGLIntArrayParameter(pname);
-    case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
-        if (m_oesStandardDerivatives)
-            return getUnsignedIntParameter(Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, OES_standard_derivatives not enabled&quot;);
-        return WebGLGetInfo();
-    case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL:
-        if (m_webglDebugRendererInfo)
-            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::RENDERER));
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
-        return WebGLGetInfo();
-    case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL:
-        if (m_webglDebugRendererInfo)
-            return WebGLGetInfo(m_context-&gt;getString(GraphicsContext3D::VENDOR));
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_debug_renderer_info not enabled&quot;);
-        return WebGLGetInfo();
-    case Extensions3D::VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object
-        if (m_oesVertexArrayObject) {
-            if (!m_boundVertexArrayObject-&gt;isDefaultObject())
-                return WebGLGetInfo(PassRefPtr&lt;WebGLVertexArrayObjectOES&gt;(m_boundVertexArrayObject));
-            return WebGLGetInfo();
-        }
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, OES_vertex_array_object not enabled&quot;);
-        return WebGLGetInfo();
-    case Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT: // EXT_texture_filter_anisotropic
-        if (m_extTextureFilterAnisotropic)
-            return getUnsignedIntParameter(Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT);
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_texture_filter_anisotropic not enabled&quot;);
-        return WebGLGetInfo();
-    case Extensions3D::MAX_COLOR_ATTACHMENTS_EXT: // EXT_draw_buffers BEGIN
-        if (m_webglDrawBuffers)
-            return WebGLGetInfo(getMaxColorAttachments());
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
-        return WebGLGetInfo();
-    case Extensions3D::MAX_DRAW_BUFFERS_EXT:
-        if (m_webglDrawBuffers)
-            return WebGLGetInfo(getMaxDrawBuffers());
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
-        return WebGLGetInfo();
-    default:
-        if (m_webglDrawBuffers
-            &amp;&amp; pname &gt;= Extensions3D::DRAW_BUFFER0_EXT
-            &amp;&amp; pname &lt; static_cast&lt;GC3Denum&gt;(Extensions3D::DRAW_BUFFER0_EXT + getMaxDrawBuffers())) {
-            GC3Dint value = GraphicsContext3D::NONE;
-            if (m_framebufferBinding)
-                value = m_framebufferBinding-&gt;getDrawBuffer(pname);
-            else // emulated backbuffer
-                value = m_backDrawBuffer;
-            return WebGLGetInfo(value);
-        }
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name&quot;);
-        return WebGLGetInfo();
-    }
-}
-
</del><span class="cx"> WebGLGetInfo WebGLRenderingContextBase::getProgramParameter(WebGLProgram* program, GC3Denum pname, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(ec);
</span><span class="lines">@@ -5653,25 +5415,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLRenderingContextBase::validateCapability(const char* functionName, GC3Denum cap)
-{
-    switch (cap) {
-    case GraphicsContext3D::BLEND:
-    case GraphicsContext3D::CULL_FACE:
-    case GraphicsContext3D::DEPTH_TEST:
-    case GraphicsContext3D::DITHER:
-    case GraphicsContext3D::POLYGON_OFFSET_FILL:
-    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
-    case GraphicsContext3D::SAMPLE_COVERAGE:
-    case GraphicsContext3D::SCISSOR_TEST:
-    case GraphicsContext3D::STENCIL_TEST:
-        return true;
-    default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, &quot;invalid capability&quot;);
-        return false;
-    }
-}
-
</del><span class="cx"> bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei requiredMinSize)
</span><span class="cx"> {
</span><span class="cx">     if (!v) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">     GC3Denum getError();
</span><span class="cx">     virtual WebGLExtension* getExtension(const String&amp; name) = 0;
</span><span class="cx">     WebGLGetInfo getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode&amp;);
</span><del>-    WebGLGetInfo getParameter(GC3Denum pname, ExceptionCode&amp;);
</del><ins>+    virtual WebGLGetInfo getParameter(GC3Denum pname, ExceptionCode&amp;) = 0;
</ins><span class="cx">     WebGLGetInfo getProgramParameter(WebGLProgram*, GC3Denum pname, ExceptionCode&amp;);
</span><span class="cx">     String getProgramInfoLog(WebGLProgram*, ExceptionCode&amp;);
</span><span class="cx">     WebGLGetInfo getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode&amp;);
</span><span class="lines">@@ -725,7 +725,7 @@
</span><span class="cx">     bool validateBlendFuncFactors(const char* functionName, GC3Denum src, GC3Denum dst);
</span><span class="cx"> 
</span><span class="cx">     // Helper function to validate a GL capability.
</span><del>-    bool validateCapability(const char* functionName, GC3Denum);
</del><ins>+    virtual bool validateCapability(const char* functionName, GC3Denum) = 0;
</ins><span class="cx"> 
</span><span class="cx">     // Helper function to validate input parameters for uniform functions.
</span><span class="cx">     bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, Float32Array*, GC3Dsizei mod);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -396,6 +396,10 @@
</span><span class="cx">     const GLenum VERTEX_ATTRIB_ARRAY_POINTER        = 0x8645;
</span><span class="cx">     const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
</span><span class="cx"> 
</span><ins>+    /* Read Format */
+    const GLenum IMPLEMENTATION_COLOR_READ_TYPE     = 0x8B9A;
+    const GLenum IMPLEMENTATION_COLOR_READ_FORMAT   = 0x8B9B;
+
</ins><span class="cx">     /* Shader Source */
</span><span class="cx">     const GLenum COMPILE_STATUS                 = 0x8B81;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (179481 => 179482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2015-02-02 19:47:06 UTC (rev 179481)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2015-02-02 20:05:37 UTC (rev 179482)
</span><span class="lines">@@ -115,6 +115,7 @@
</span><span class="cx"> class GraphicsContext3D : public RefCounted&lt;GraphicsContext3D&gt; {
</span><span class="cx"> public:
</span><span class="cx">     enum {
</span><ins>+        // WebGL 1 constants
</ins><span class="cx">         DEPTH_BUFFER_BIT = 0x00000100,
</span><span class="cx">         STENCIL_BUFFER_BIT = 0x00000400,
</span><span class="cx">         COLOR_BUFFER_BIT = 0x00004000,
</span><span class="lines">@@ -369,6 +370,8 @@
</span><span class="cx">         VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A,
</span><span class="cx">         VERTEX_ATTRIB_ARRAY_POINTER = 0x8645,
</span><span class="cx">         VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F,
</span><ins>+        IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A,
+        IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B,
</ins><span class="cx">         COMPILE_STATUS = 0x8B81,
</span><span class="cx">         INFO_LOG_LENGTH = 0x8B84,
</span><span class="cx">         SHADER_SOURCE_LENGTH = 0x8B88,
</span><span class="lines">@@ -389,9 +392,6 @@
</span><span class="cx">         DEPTH_COMPONENT16 = 0x81A5,
</span><span class="cx">         STENCIL_INDEX = 0x1901,
</span><span class="cx">         STENCIL_INDEX8 = 0x8D48,
</span><del>-        DEPTH_STENCIL = 0x84F9,
-        UNSIGNED_INT_24_8 = 0x84FA,
-        DEPTH24_STENCIL8 = 0x88F0,
</del><span class="cx">         RENDERBUFFER_WIDTH = 0x8D42,
</span><span class="cx">         RENDERBUFFER_HEIGHT = 0x8D43,
</span><span class="cx">         RENDERBUFFER_INTERNAL_FORMAT = 0x8D44,
</span><span class="lines">@@ -408,7 +408,6 @@
</span><span class="cx">         COLOR_ATTACHMENT0 = 0x8CE0,
</span><span class="cx">         DEPTH_ATTACHMENT = 0x8D00,
</span><span class="cx">         STENCIL_ATTACHMENT = 0x8D20,
</span><del>-        DEPTH_STENCIL_ATTACHMENT = 0x821A,
</del><span class="cx">         NONE = 0,
</span><span class="cx">         FRAMEBUFFER_COMPLETE = 0x8CD5,
</span><span class="cx">         FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6,
</span><span class="lines">@@ -426,7 +425,289 @@
</span><span class="cx">         CONTEXT_LOST_WEBGL = 0x9242,
</span><span class="cx">         UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243,
</span><span class="cx">         BROWSER_DEFAULT_WEBGL = 0x9244,
</span><del>-        VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE
</del><ins>+        VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE,
+        
+        // WebGL2 constants
+        READ_BUFFER = 0x0C02,
+        UNPACK_ROW_LENGTH = 0x0CF2,
+        UNPACK_SKIP_ROWS = 0x0CF3,
+        UNPACK_SKIP_PIXELS = 0x0CF4,
+        PACK_ROW_LENGTH = 0x0D02,
+        PACK_SKIP_ROWS = 0x0D03,
+        PACK_SKIP_PIXELS = 0x0D04,
+        COLOR = 0x1800,
+        DEPTH = 0x1801,
+        STENCIL = 0x1802,
+        RED = 0x1903,
+        RGB8 = 0x8051,
+        RGBA8 = 0x8058,
+        RGB10_A2 = 0x8059,
+        TEXTURE_BINDING_3D = 0x806A,
+        UNPACK_SKIP_IMAGES = 0x806D,
+        UNPACK_IMAGE_HEIGHT = 0x806E,
+        TEXTURE_3D = 0x806F,
+        TEXTURE_WRAP_R = 0x8072,
+        MAX_3D_TEXTURE_SIZE = 0x8073,
+        UNSIGNED_INT_2_10_10_10_REV = 0x8368,
+        MAX_ELEMENTS_VERTICES = 0x80E8,
+        MAX_ELEMENTS_INDICES = 0x80E9,
+        TEXTURE_MIN_LOD = 0x813A,
+        TEXTURE_MAX_LOD = 0x813B,
+        TEXTURE_BASE_LEVEL = 0x813C,
+        TEXTURE_MAX_LEVEL = 0x813D,
+        MIN = 0x8007,
+        MAX = 0x8008,
+        DEPTH_COMPONENT24 = 0x81A6,
+        MAX_TEXTURE_LOD_BIAS = 0x84FD,
+        TEXTURE_COMPARE_MODE = 0x884C,
+        TEXTURE_COMPARE_FUNC = 0x884D,
+        CURRENT_QUERY = 0x8865,
+        QUERY_RESULT = 0x8866,
+        QUERY_RESULT_AVAILABLE = 0x8867,
+        STREAM_READ = 0x88E1,
+        STREAM_COPY = 0x88E2,
+        STATIC_READ = 0x88E5,
+        STATIC_COPY = 0x88E6,
+        DYNAMIC_READ = 0x88E9,
+        DYNAMIC_COPY = 0x88EA,
+        MAX_DRAW_BUFFERS = 0x8824,
+        DRAW_BUFFER0 = 0x8825,
+        DRAW_BUFFER1 = 0x8826,
+        DRAW_BUFFER2 = 0x8827,
+        DRAW_BUFFER3 = 0x8828,
+        DRAW_BUFFER4 = 0x8829,
+        DRAW_BUFFER5 = 0x882A,
+        DRAW_BUFFER6 = 0x882B,
+        DRAW_BUFFER7 = 0x882C,
+        DRAW_BUFFER8 = 0x882D,
+        DRAW_BUFFER9 = 0x882E,
+        DRAW_BUFFER10 = 0x882F,
+        DRAW_BUFFER11 = 0x8830,
+        DRAW_BUFFER12 = 0x8831,
+        DRAW_BUFFER13 = 0x8832,
+        DRAW_BUFFER14 = 0x8833,
+        DRAW_BUFFER15 = 0x8834,
+        MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49,
+        MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A,
+        SAMPLER_3D = 0x8B5F,
+        SAMPLER_2D_SHADOW = 0x8B62,
+        FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B,
+        PIXEL_PACK_BUFFER = 0x88EB,
+        PIXEL_UNPACK_BUFFER = 0x88EC,
+        PIXEL_PACK_BUFFER_BINDING = 0x88ED,
+        PIXEL_UNPACK_BUFFER_BINDING = 0x88EF,
+        FLOAT_MAT2x3 = 0x8B65,
+        FLOAT_MAT2x4 = 0x8B66,
+        FLOAT_MAT3x2 = 0x8B67,
+        FLOAT_MAT3x4 = 0x8B68,
+        FLOAT_MAT4x2 = 0x8B69,
+        FLOAT_MAT4x3 = 0x8B6A,
+        SRGB = 0x8C40,
+        SRGB8 = 0x8C41,
+        SRGB8_ALPHA8 = 0x8C43,
+        COMPARE_REF_TO_TEXTURE = 0x884E,
+        RGBA32F = 0x8814,
+        RGB32F = 0x8815,
+        RGBA16 = 0x881A,
+        RGB16F = 0x881B,
+        VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD,
+        MAX_ARRAY_TEXTURE_LAYERS = 0x88FF,
+        MIN_PROGRAM_TEXEL_OFFSET = 0x8904,
+        MAX_PROGRAM_TEXEL_OFFSET = 0x8905,
+        MAX_VARYING_COMPONENTS = 0x8B4B,
+        TEXTURE_2D_ARRAY = 0x8C1A,
+        TEXTURE_BINDING_2D_ARRAY = 0x8C1D,
+        R11F_G11F_B10F = 0x8C3A,
+        UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B,
+        RGB9_E5 = 0x8C3D,
+        UNSIGNED_INT_5_9_9_9_REV = 0x8C3E,
+        TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F,
+        MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80,
+        TRANSFORM_FEEDBACK_VARYINGS = 0x8C83,
+        TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84,
+        TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85,
+        TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88,
+        RASTERIZER_DISCARD = 0x8C89,
+        MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A,
+        MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B,
+        INTERLEAVED_ATTRIBS = 0x8C8C,
+        SEPARATE_ATTRIBS = 0x8C8D,
+        TRANSFORM_FEEDBACK_BUFFER = 0x8C8E,
+        TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F,
+        RGBA32UI = 0x8D70,
+        RGB32UI = 0x8D71,
+        RGBA16UI = 0x8D76,
+        RGB16UI = 0x8D77,
+        RGBA8UI = 0x8D7C,
+        RGB8UI = 0x8D7D,
+        RGBA32I = 0x8D82,
+        RGB32I = 0x8D83,
+        RGBA16I = 0x8D88,
+        RGB16I = 0x8D89,
+        RGBA8I = 0x8D8E,
+        RGB8I = 0x8D8F,
+        RED_INTEGER = 0x8D94,
+        RGB_INTEGER = 0x8D98,
+        RGBA_INTEGER = 0x8D99,
+        SAMPLER_2D_ARRAY = 0x8DC1,
+        SAMPLER_2D_ARRAY_SHADOW = 0x8DC4,
+        SAMPLER_CUBE_SHADOW = 0x8DC5,
+        UNSIGNED_INT_VEC2 = 0x8DC6,
+        UNSIGNED_INT_VEC3 = 0x8DC7,
+        UNSIGNED_INT_VEC4 = 0x8DC8,
+        INT_SAMPLER_2D = 0x8DCA,
+        INT_SAMPLER_3D = 0x8DCB,
+        INT_SAMPLER_CUBE = 0x8DCC,
+        INT_SAMPLER_2D_ARRAY = 0x8DCF,
+        UNSIGNED_INT_SAMPLER_2D = 0x8DD2,
+        UNSIGNED_INT_SAMPLER_3D = 0x8DD3,
+        UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4,
+        UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7,
+        DEPTH_COMPONENT32F = 0x8CAC,
+        DEPTH32F_STENCIL8 = 0x8CAD,
+        FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD,
+        FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210,
+        FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211,
+        FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212,
+        FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213,
+        FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214,
+        FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215,
+        FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216,
+        FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217,
+        FRAMEBUFFER_DEFAULT = 0x8218,
+        DEPTH_STENCIL_ATTACHMENT = 0x821A,
+        DEPTH_STENCIL = 0x84F9,
+        UNSIGNED_INT_24_8 = 0x84FA,
+        DEPTH24_STENCIL8 = 0x88F0,
+        UNSIGNED_NORMALIZED = 0x8C17,
+        DRAW_FRAMEBUFFER_BINDING = 0x8CA6, /* Same as FRAMEBUFFER_BINDING */
+        READ_FRAMEBUFFER = 0x8CA8,
+        DRAW_FRAMEBUFFER = 0x8CA9,
+        READ_FRAMEBUFFER_BINDING = 0x8CAA,
+        RENDERBUFFER_SAMPLES = 0x8CAB,
+        FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4,
+        MAX_COLOR_ATTACHMENTS = 0x8CDF,
+        COLOR_ATTACHMENT1 = 0x8CE1,
+        COLOR_ATTACHMENT2 = 0x8CE2,
+        COLOR_ATTACHMENT3 = 0x8CE3,
+        COLOR_ATTACHMENT4 = 0x8CE4,
+        COLOR_ATTACHMENT5 = 0x8CE5,
+        COLOR_ATTACHMENT6 = 0x8CE6,
+        COLOR_ATTACHMENT7 = 0x8CE7,
+        COLOR_ATTACHMENT8 = 0x8CE8,
+        COLOR_ATTACHMENT9 = 0x8CE9,
+        COLOR_ATTACHMENT10 = 0x8CEA,
+        COLOR_ATTACHMENT11 = 0x8CEB,
+        COLOR_ATTACHMENT12 = 0x8CEC,
+        COLOR_ATTACHMENT13 = 0x8CED,
+        COLOR_ATTACHMENT14 = 0x8CEE,
+        COLOR_ATTACHMENT15 = 0x8CEF,
+        FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56,
+        MAX_SAMPLES = 0x8D57,
+        HALF_FLOAT = 0x140B,
+        RG = 0x8227,
+        RG_INTEGER = 0x8228,
+        R8 = 0x8229,
+        RG8 = 0x822B,
+        R16F = 0x822D,
+        R32F = 0x822E,
+        RG16F = 0x822F,
+        RG32F = 0x8230,
+        R8I = 0x8231,
+        R8UI = 0x8232,
+        R16I = 0x8233,
+        R16UI = 0x8234,
+        R32I = 0x8235,
+        R32UI = 0x8236,
+        RG8I = 0x8237,
+        RG8UI = 0x8238,
+        RG16I = 0x8239,
+        RG16UI = 0x823A,
+        RG32I = 0x823B,
+        RG32UI = 0x823C,
+        VERTEX_ARRAY_BINDING = 0x85B5,
+        R8_SNORM = 0x8F94,
+        RG8_SNORM = 0x8F95,
+        RGB8_SNORM = 0x8F96,
+        RGBA8_SNORM = 0x8F97,
+        SIGNED_NORMALIZED = 0x8F9C,
+        COPY_READ_BUFFER = 0x8F36,
+        COPY_WRITE_BUFFER = 0x8F37,
+        COPY_READ_BUFFER_BINDING = 0x8F36, /* Same as COPY_READ_BUFFER */
+        COPY_WRITE_BUFFER_BINDING = 0x8F37, /* Same as COPY_WRITE_BUFFER */
+        UNIFORM_BUFFER = 0x8A11,
+        UNIFORM_BUFFER_BINDING = 0x8A28,
+        UNIFORM_BUFFER_START = 0x8A29,
+        UNIFORM_BUFFER_SIZE = 0x8A2A,
+        MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B,
+        MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D,
+        MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E,
+        MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F,
+        MAX_UNIFORM_BLOCK_SIZE = 0x8A30,
+        MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31,
+        MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33,
+        UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34,
+        ACTIVE_UNIFORM_BLOCKS = 0x8A36,
+        UNIFORM_TYPE = 0x8A37,
+        UNIFORM_SIZE = 0x8A38,
+        UNIFORM_BLOCK_INDEX = 0x8A3A,
+        UNIFORM_OFFSET = 0x8A3B,
+        UNIFORM_ARRAY_STRIDE = 0x8A3C,
+        UNIFORM_MATRIX_STRIDE = 0x8A3D,
+        UNIFORM_IS_ROW_MAJOR = 0x8A3E,
+        UNIFORM_BLOCK_BINDING = 0x8A3F,
+        UNIFORM_BLOCK_DATA_SIZE = 0x8A40,
+        UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42,
+        UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43,
+        UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44,
+        UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46,
+        INVALID_INDEX = 0xFFFFFFFF,
+        MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122,
+        MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125,
+        MAX_SERVER_WAIT_TIMEOUT = 0x9111,
+        OBJECT_TYPE = 0x9112,
+        SYNC_CONDITION = 0x9113,
+        SYNC_STATUS = 0x9114,
+        SYNC_FLAGS = 0x9115,
+        SYNC_FENCE = 0x9116,
+        SYNC_GPU_COMMANDS_COMPLETE = 0x9117,
+        UNSIGNALED = 0x9118,
+        SIGNALED = 0x9119,
+        ALREADY_SIGNALED = 0x911A,
+        TIMEOUT_EXPIRED = 0x911B,
+        CONDITION_SATISFIED = 0x911C,
+        WAIT_FAILED = 0x911D,
+        SYNC_FLUSH_COMMANDS_BIT = 0x00000001,
+        VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE,
+        ANY_SAMPLES_PASSED = 0x8C2F,
+        ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A,
+        SAMPLER_BINDING = 0x8919,
+        RGB10_A2UI = 0x906F,
+        TEXTURE_SWIZZLE_R = 0x8E42,
+        TEXTURE_SWIZZLE_G = 0x8E43,
+        TEXTURE_SWIZZLE_B = 0x8E44,
+        TEXTURE_SWIZZLE_A = 0x8E45,
+        GREEN = 0x1904,
+        BLUE = 0x1905,
+        INT_2_10_10_10_REV = 0x8D9F,
+        TRANSFORM_FEEDBACK = 0x8E22,
+        TRANSFORM_FEEDBACK_PAUSED = 0x8E23,
+        TRANSFORM_FEEDBACK_ACTIVE = 0x8E24,
+        TRANSFORM_FEEDBACK_BINDING = 0x8E25,
+        COMPRESSED_R11_EAC = 0x9270,
+        COMPRESSED_SIGNED_R11_EAC = 0x9271,
+        COMPRESSED_RG11_EAC = 0x9272,
+        COMPRESSED_SIGNED_RG11_EAC = 0x9273,
+        COMPRESSED_RGB8_ETC2 = 0x9274,
+        COMPRESSED_SRGB8_ETC2 = 0x9275,
+        COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276,
+        COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277,
+        COMPRESSED_RGBA8_ETC2_EAC = 0x9278,
+        COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279,
+        TEXTURE_IMMUTABLE_FORMAT = 0x912F,
+        MAX_ELEMENT_INDEX = 0x8D6B,
+        NUM_SAMPLE_COUNTS = 0x9380,
+        TEXTURE_IMMUTABLE_LEVELS = 0x82DF
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // Context creation attributes.
</span></span></pre>
</div>
</div>

</body>
</html>