Title: [199062] trunk
Revision
199062
Author
[email protected]
Date
2016-04-05 09:54:07 -0700 (Tue, 05 Apr 2016)

Log Message

[WebGL2] Turn the ENABLE_WEBGL2 flag on
https://bugs.webkit.org/show_bug.cgi?id=156061
<rdar://problem/25463193>

Patch by Antoine Quint <[email protected]> on 2016-04-05
Reviewed by Alex Christensen.

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig:
* runtime/CommonIdentifiers.h:

Define the conditionalized classes WebGL2RenderingContext and WebGLVertexArrayObject.

Source/WebCore:

Conditionalize the definition of the WebGL2RenderingContext and WebGLVertexArrayObject globals
based on the new WebGL2 runtime flag we introduced in https://webkit.org/b/156166.

Turning the ENABLE_WEBGL2 flag on caused a host of build errors which we fix here. A non-obvious
error was in code generated from the html/canvas/WebGL2RenderingContext.idl file which was solved
by updating the getBufferSubData() method to the current signature as of the March 29 Editor's
Draft of the WebGL 2 Specification (https://www.khronos.org/registry/webgl/specs/latest/2.0/).
Missing JSC headers in WebGL2RenderingContext.cpp also caused some linking errors in Release builds.

Tests: webgl/webgl-vertex-array-object-defined.html
       webgl/webgl2-rendering-context-defined.html
       webgl/webgl2-rendering-context-obtain.html

* Configurations/FeatureDefines.xcconfig:
* bindings/js/JSWebGL2RenderingContextCustom.cpp:
(WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
(WebCore::JSWebGL2RenderingContext::getQueryParameter):
(WebCore::JSWebGL2RenderingContext::getSamplerParameter):
(WebCore::JSWebGL2RenderingContext::getSyncParameter):
(WebCore::JSWebGL2RenderingContext::getIndexedParameter):
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::is3dType):
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getBufferSubData): Deleted.
* html/canvas/WebGL2RenderingContext.idl:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* html/canvas/WebGLVertexArrayObject.idl:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

LayoutTests:

* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

The WebGL2RenderingContext and WebGLVertexArrayObject classes are now defined
so expectations for this test which lists the configuration of global constructors
needed to be updated.

* webgl/webgl-vertex-array-object-defined-expected.txt: Added.
* webgl/webgl-vertex-array-object-defined.html: Added.

Test checking that WebGLVertexArrayObject is defined.

* webgl/webgl2-rendering-context-defined-expected.txt: Added.
* webgl/webgl2-rendering-context-defined.html: Added.

Test checking that WebGL2RenderingContext is defined.

* webgl/webgl2-rendering-context-obtain-expected.txt: Added.
* webgl/webgl2-rendering-context-obtain.html: Added.

Test checking that asking for a "webgl2" context returns a WebGL2RenderingContext.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199061 => 199062)


--- trunk/LayoutTests/ChangeLog	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/LayoutTests/ChangeLog	2016-04-05 16:54:07 UTC (rev 199062)
@@ -1,3 +1,33 @@
+2016-04-05  Antoine Quint  <[email protected]>
+
+        [WebGL2] Turn the ENABLE_WEBGL2 flag on
+        https://bugs.webkit.org/show_bug.cgi?id=156061
+        <rdar://problem/25463193>
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+
+        The WebGL2RenderingContext and WebGLVertexArrayObject classes are now defined
+        so expectations for this test which lists the configuration of global constructors
+        needed to be updated.
+
+        * webgl/webgl-vertex-array-object-defined-expected.txt: Added.
+        * webgl/webgl-vertex-array-object-defined.html: Added.
+
+        Test checking that WebGLVertexArrayObject is defined.
+
+        * webgl/webgl2-rendering-context-defined-expected.txt: Added.
+        * webgl/webgl2-rendering-context-defined.html: Added.
+
+        Test checking that WebGL2RenderingContext is defined.
+
+        * webgl/webgl2-rendering-context-obtain-expected.txt: Added.
+        * webgl/webgl2-rendering-context-obtain.html: Added.
+
+        Test checking that asking for a "webgl2" context returns a WebGL2RenderingContext.
+
 2016-04-05  Chris Dumez  <[email protected]>
 
         We sometimes fail to remove outdated entry from the disk cache after revalidation and when the resource is no longer cacheable

Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (199061 => 199062)


--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2016-04-05 16:54:07 UTC (rev 199062)
@@ -2113,6 +2113,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').value is WebGL2RenderingContext
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').value is WebGLActiveInfo
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('set') is false
@@ -2188,6 +2193,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').value is WebGLVertexArrayObject
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').value is WebKitAnimationEvent
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (199061 => 199062)


--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt	2016-04-05 16:54:07 UTC (rev 199062)
@@ -2113,6 +2113,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'WeakSet').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').value is WebGL2RenderingContext
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').value is WebGLActiveInfo
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('set') is false
@@ -2188,6 +2193,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLUniformLocation').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').value is WebGLVertexArrayObject
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WebGLVertexArrayObject').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').value is WebKitAnimationEvent
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebKitAnimationEvent').hasOwnProperty('set') is false

Added: trunk/LayoutTests/webgl/webgl-vertex-array-object-defined-expected.txt (0 => 199062)


--- trunk/LayoutTests/webgl/webgl-vertex-array-object-defined-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl-vertex-array-object-defined-expected.txt	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1 @@
+PASS if WebGLVertexArrayObject is defined.

Added: trunk/LayoutTests/webgl/webgl-vertex-array-object-defined.html (0 => 199062)


--- trunk/LayoutTests/webgl/webgl-vertex-array-object-defined.html	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl-vertex-array-object-defined.html	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1,8 @@
+<div id="result">PASS if WebGLVertexArrayObject is defined.</div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+if (typeof WebGLVertexArrayObject === "undefined")
+    document.getElementById("result").innerHTML = "FAIL";
+</script>

Added: trunk/LayoutTests/webgl/webgl2-rendering-context-defined-expected.txt (0 => 199062)


--- trunk/LayoutTests/webgl/webgl2-rendering-context-defined-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl2-rendering-context-defined-expected.txt	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1 @@
+PASS if WebGL2RenderingContext is defined.

Added: trunk/LayoutTests/webgl/webgl2-rendering-context-defined.html (0 => 199062)


--- trunk/LayoutTests/webgl/webgl2-rendering-context-defined.html	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl2-rendering-context-defined.html	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1,8 @@
+<div id="result">PASS if WebGL2RenderingContext is defined.</div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+if (typeof WebGL2RenderingContext === "undefined")
+    document.getElementById("result").innerHTML = "FAIL";
+</script>

Added: trunk/LayoutTests/webgl/webgl2-rendering-context-obtain-expected.txt (0 => 199062)


--- trunk/LayoutTests/webgl/webgl2-rendering-context-obtain-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl2-rendering-context-obtain-expected.txt	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1 @@
+PASS if a "webgl2" context can be obtained.

Added: trunk/LayoutTests/webgl/webgl2-rendering-context-obtain.html (0 => 199062)


--- trunk/LayoutTests/webgl/webgl2-rendering-context-obtain.html	                        (rev 0)
+++ trunk/LayoutTests/webgl/webgl2-rendering-context-obtain.html	2016-04-05 16:54:07 UTC (rev 199062)
@@ -0,0 +1,8 @@
+<div id="result">PASS if a "webgl2" context can be obtained.</div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+if (!(document.createElement("canvas").getContext("webgl2") instanceof WebGL2RenderingContext))
+    document.getElementById("result").innerHTML = "FAIL";
+</script>

Modified: trunk/Source/_javascript_Core/ChangeLog (199061 => 199062)


--- trunk/Source/_javascript_Core/ChangeLog	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-05 16:54:07 UTC (rev 199062)
@@ -1,3 +1,16 @@
+2016-04-05  Antoine Quint  <[email protected]>
+
+        [WebGL2] Turn the ENABLE_WEBGL2 flag on
+        https://bugs.webkit.org/show_bug.cgi?id=156061
+        <rdar://problem/25463193>
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * runtime/CommonIdentifiers.h:
+
+        Define the conditionalized classes WebGL2RenderingContext and WebGLVertexArrayObject. 
+
 2016-04-04  Zan Dobersek  <[email protected]>
 
         Add missing EABI_32BIT_DUMMY_ARG arguments for some callOperation(J_JITOperation_EGReoJ, ...) overloads

Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (199061 => 199062)


--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-04-05 16:54:07 UTC (rev 199062)
@@ -176,7 +176,7 @@
 ENABLE_VIEW_MODE_CSS_MEDIA = ;
 ENABLE_WEBASSEMBLY = ;
 ENABLE_WEBGL = ENABLE_WEBGL;
-ENABLE_WEBGL2 = ;
+ENABLE_WEBGL2 = ENABLE_WEBGL2;
 ENABLE_WEB_ANIMATIONS = ENABLE_WEB_ANIMATIONS;
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 ENABLE_WEB_REPLAY = $(ENABLE_WEB_REPLAY_$(PLATFORM_NAME)_$(CONFIGURATION));

Modified: trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h (199061 => 199062)


--- trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2016-04-05 16:54:07 UTC (rev 199062)
@@ -87,6 +87,8 @@
     macro(UTC) \
     macro(WeakMap)\
     macro(WeakSet)\
+    macro(WebGL2RenderingContext) \
+    macro(WebGLVertexArrayObject) \
     macro(WebSocket) \
     macro(__defineGetter__) \
     macro(__defineSetter__) \

Modified: trunk/Source/WebCore/ChangeLog (199061 => 199062)


--- trunk/Source/WebCore/ChangeLog	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/ChangeLog	2016-04-05 16:54:07 UTC (rev 199062)
@@ -1,3 +1,42 @@
+2016-04-05  Antoine Quint  <[email protected]>
+
+        [WebGL2] Turn the ENABLE_WEBGL2 flag on
+        https://bugs.webkit.org/show_bug.cgi?id=156061
+        <rdar://problem/25463193>
+
+        Reviewed by Alex Christensen.
+
+        Conditionalize the definition of the WebGL2RenderingContext and WebGLVertexArrayObject globals
+        based on the new WebGL2 runtime flag we introduced in https://webkit.org/b/156166.
+
+        Turning the ENABLE_WEBGL2 flag on caused a host of build errors which we fix here. A non-obvious
+        error was in code generated from the html/canvas/WebGL2RenderingContext.idl file which was solved
+        by updating the getBufferSubData() method to the current signature as of the March 29 Editor's
+        Draft of the WebGL 2 Specification (https://www.khronos.org/registry/webgl/specs/latest/2.0/).
+        Missing JSC headers in WebGL2RenderingContext.cpp also caused some linking errors in Release builds.
+
+        Tests: webgl/webgl-vertex-array-object-defined.html
+               webgl/webgl2-rendering-context-defined.html
+               webgl/webgl2-rendering-context-obtain.html
+
+        * Configurations/FeatureDefines.xcconfig:
+        * bindings/js/JSWebGL2RenderingContextCustom.cpp:
+        (WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
+        (WebCore::JSWebGL2RenderingContext::getQueryParameter):
+        (WebCore::JSWebGL2RenderingContext::getSamplerParameter):
+        (WebCore::JSWebGL2RenderingContext::getSyncParameter):
+        (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
+        (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
+        (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::is3dType):
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::getBufferSubData): Deleted.
+        * html/canvas/WebGL2RenderingContext.idl:
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::create):
+        * html/canvas/WebGLVertexArrayObject.idl:
+
 2016-04-05  Antti Koivisto  <[email protected]>
 
         Shadow DOM: :host() From The First Shadow Context Should Not Style All Shadow Context

Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (199061 => 199062)


--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-04-05 16:54:07 UTC (rev 199062)
@@ -176,7 +176,7 @@
 ENABLE_VIEW_MODE_CSS_MEDIA = ;
 ENABLE_WEBASSEMBLY = ;
 ENABLE_WEBGL = ENABLE_WEBGL;
-ENABLE_WEBGL2 = ;
+ENABLE_WEBGL2 = ENABLE_WEBGL2;
 ENABLE_WEB_ANIMATIONS = ENABLE_WEB_ANIMATIONS;
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 ENABLE_WEB_REPLAY = $(ENABLE_WEB_REPLAY_$(PLATFORM_NAME)_$(CONFIGURATION));

Modified: trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp (199061 => 199062)


--- trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp	2016-04-05 16:54:07 UTC (rev 199062)
@@ -28,6 +28,7 @@
 #if ENABLE(WEBGL) && ENABLE(WEBGL2)
 #include "JSWebGL2RenderingContext.h"
 
+#include <runtime/Error.h>
 #include "NotImplemented.h"
 #include "WebGL2RenderingContext.h"
 
@@ -70,53 +71,53 @@
     visitor.addOpaqueRoot(&wrapped());
 }
 
-JSValue JSWebGL2RenderingContext::getInternalformatParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getInternalformatParameter(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();
 }
 
-JSValue JSWebGL2RenderingContext::getQueryParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getQueryParameter(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();
 }
 
-JSValue JSWebGL2RenderingContext::getSamplerParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getSamplerParameter(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();
 }
 
-JSValue JSWebGL2RenderingContext::getSyncParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getSyncParameter(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();
 }
 
-JSValue JSWebGL2RenderingContext::getIndexedParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getIndexedParameter(ExecState& exec)
 {
-    if (exec->argumentCount() != 2)
-        return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
+    if (exec.argumentCount() != 2)
+        return exec.vm().throwException(&exec, createNotEnoughArgumentsError(&exec));
 
     WebGL2RenderingContext& context = wrapped();
-    unsigned pname = exec->uncheckedArgument(0).toInt32(exec);
-    if (exec->hadException())
+    unsigned pname = exec.uncheckedArgument(0).toInt32(&exec);
+    if (exec.hadException())
         return jsUndefined();
-    unsigned index = exec->uncheckedArgument(1).toInt32(exec);
-    if (exec->hadException())
+    unsigned index = exec.uncheckedArgument(1).toInt32(&exec);
+    if (exec.hadException())
         return jsUndefined();
     WebGLGetInfo info = context.getIndexedParameter(pname, index);
-    return toJS(exec, globalObject(), info);
+    return toJS(&exec, globalObject(), info);
 }
 
-JSValue JSWebGL2RenderingContext::getActiveUniformBlockParameter(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getActiveUniformBlockParameter(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();
 }
 
-JSValue JSWebGL2RenderingContext::getActiveUniformBlockName(ExecState* exec)
+JSValue JSWebGL2RenderingContext::getActiveUniformBlockName(ExecState& exec)
 {
     UNUSED_PARAM(exec);
     return jsUndefined();

Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (199061 => 199062)


--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2016-04-05 16:54:07 UTC (rev 199062)
@@ -296,7 +296,7 @@
     // Retain support for the legacy "webkit-3d" name.
     return type == "webgl" || type == "experimental-webgl"
 #if ENABLE(WEBGL2)
-        || type == "experimental-webgl2"
+        || type == "webgl2"
 #endif
         || type == "webkit-3d";
 }

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (199061 => 199062)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2016-04-05 16:54:07 UTC (rev 199062)
@@ -54,6 +54,8 @@
 #include "WebGLSync.h"
 #include "WebGLTransformFeedback.h"
 #include "WebGLVertexArrayObject.h"
+#include <_javascript_Core/GenericTypedArrayViewInlines.h>
+#include <_javascript_Core/JSGenericTypedArrayViewInlines.h>
 
 namespace WebCore {
 
@@ -95,13 +97,6 @@
     UNUSED_PARAM(size);
 }
 
-void WebGL2RenderingContext::getBufferSubData(GC3Denum target, GC3Dint64 offset, ArrayBufferView* returnedData)
-{
-    UNUSED_PARAM(target);
-    UNUSED_PARAM(offset);
-    UNUSED_PARAM(returnedData);
-}
-
 void WebGL2RenderingContext::getBufferSubData(GC3Denum target, GC3Dint64 offset, ArrayBuffer* returnedData)
 {
     UNUSED_PARAM(target);

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl (199061 => 199062)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl	2016-04-05 16:54:07 UTC (rev 199062)
@@ -42,6 +42,7 @@
 
 [
     Conditional=WEBGL2,
+    EnabledAtRuntime=WebGL2,
     JSCustomMarkFunction,
     DoNotCheckConstants,
 ] interface WebGL2RenderingContext : WebGLRenderingContextBase {
@@ -335,8 +336,7 @@
     // MapBufferRange, in particular its read-only and write-only modes,
     // can not be exposed safely to _javascript_. GetBufferSubData
     // replaces it for the purpose of fetching data back from the GPU.
-    [StrictTypeChecking] void getBufferSubData(GLenum target, GLintptr offset, ArrayBufferView returnedData);
-    [StrictTypeChecking] void getBufferSubData(GLenum target, GLintptr offset, ArrayBuffer returnedData);
+    [StrictTypeChecking] void getBufferSubData(GLenum target, GLintptr offset, ArrayBuffer? returnedData);
 
     /* Framebuffer objects */
     [StrictTypeChecking] void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (199061 => 199062)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-04-05 16:54:07 UTC (rev 199062)
@@ -404,7 +404,7 @@
         LOG(WebGL, "Create a WebGL context that looks real, but will require a policy resolution if used.");
         std::unique_ptr<WebGLRenderingContextBase> renderingContext = nullptr;
 #if ENABLE(WEBGL2)
-        if (type == "experimental-webgl2")
+        if (type == "webgl2")
             renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, attributes));
         else
 #endif
@@ -427,7 +427,7 @@
 
     std::unique_ptr<WebGLRenderingContextBase> renderingContext = nullptr;
 #if ENABLE(WEBGL2)
-    if (type == "experimental-webgl2")
+    if (type == "webgl2")
         renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, context, attributes));
     else
 #endif

Modified: trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.idl (199061 => 199062)


--- trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.idl	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.idl	2016-04-05 16:54:07 UTC (rev 199062)
@@ -24,6 +24,7 @@
  */
 
 [
-    Conditional=WEBGL2
+    Conditional=WEBGL2,
+    EnabledAtRuntime=WebGL2
 ] interface WebGLVertexArrayObject {
 };

Modified: trunk/Source/WebKit/mac/ChangeLog (199061 => 199062)


--- trunk/Source/WebKit/mac/ChangeLog	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-04-05 16:54:07 UTC (rev 199062)
@@ -1,5 +1,15 @@
 2016-04-05  Antoine Quint  <[email protected]>
 
+        [WebGL2] Turn the ENABLE_WEBGL2 flag on
+        https://bugs.webkit.org/show_bug.cgi?id=156061
+        <rdar://problem/25463193>
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2016-04-05  Antoine Quint  <[email protected]>
+
         [WebGL2] Allow enabling WebGL2 with a runtime flag
         https://bugs.webkit.org/show_bug.cgi?id=156166
         <rdar://problem/25526929>

Modified: trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (199061 => 199062)


--- trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2016-04-05 16:54:07 UTC (rev 199062)
@@ -176,7 +176,7 @@
 ENABLE_VIEW_MODE_CSS_MEDIA = ;
 ENABLE_WEBASSEMBLY = ;
 ENABLE_WEBGL = ENABLE_WEBGL;
-ENABLE_WEBGL2 = ;
+ENABLE_WEBGL2 = ENABLE_WEBGL2;
 ENABLE_WEB_ANIMATIONS = ENABLE_WEB_ANIMATIONS;
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 ENABLE_WEB_REPLAY = $(ENABLE_WEB_REPLAY_$(PLATFORM_NAME)_$(CONFIGURATION));

Modified: trunk/Source/WebKit2/ChangeLog (199061 => 199062)


--- trunk/Source/WebKit2/ChangeLog	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-05 16:54:07 UTC (rev 199062)
@@ -1,3 +1,13 @@
+2016-04-05  Antoine Quint  <[email protected]>
+
+        [WebGL2] Turn the ENABLE_WEBGL2 flag on
+        https://bugs.webkit.org/show_bug.cgi?id=156061
+        <rdar://problem/25463193>
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2016-04-05  Chris Dumez  <[email protected]>
 
         We sometimes fail to remove outdated entry from the disk cache after revalidation and when the resource is no longer cacheable

Modified: trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig (199061 => 199062)


--- trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2016-04-05 16:50:29 UTC (rev 199061)
+++ trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2016-04-05 16:54:07 UTC (rev 199062)
@@ -176,7 +176,7 @@
 ENABLE_VIEW_MODE_CSS_MEDIA = ;
 ENABLE_WEBASSEMBLY = ;
 ENABLE_WEBGL = ENABLE_WEBGL;
-ENABLE_WEBGL2 = ;
+ENABLE_WEBGL2 = ENABLE_WEBGL2;
 ENABLE_WEB_ANIMATIONS = ENABLE_WEB_ANIMATIONS;
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 ENABLE_WEB_REPLAY = $(ENABLE_WEB_REPLAY_$(PLATFORM_NAME)_$(CONFIGURATION));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to