Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1379863003: Added overloads of uniform[1234]uiv taking Uint32Array to match spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index b9c262595caaa28c2beb19527eb3c9f82c693f2f..7707de323b5a31070eb71434b6255d4815a74cee 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -923,6 +923,14 @@ void WebGL2RenderingContextBase::uniform4ui(const WebGLUniformLocation* location
webContext()->uniform4ui(location->location(), v0, v1, v2, v3);
}
+void WebGL2RenderingContextBase::uniform1uiv(const WebGLUniformLocation* location, const FlexibleUint32ArrayView& v)
+{
+ if (isContextLost() || !validateUniformParameters<WTF::Uint32Array>("uniform1uiv", location, v, 1))
+ return;
+
+ webContext()->uniform1uiv(location->location(), v.length(), v.dataMaybeOnStack());
+}
+
void WebGL2RenderingContextBase::uniform1uiv(const WebGLUniformLocation* location, Vector<GLuint>& value)
{
if (isContextLost() || validateUniformParameters("uniform1uiv", location, value.data(), value.size(), 1))
@@ -931,6 +939,14 @@ void WebGL2RenderingContextBase::uniform1uiv(const WebGLUniformLocation* locatio
webContext()->uniform1uiv(location->location(), value.size(), value.data());
}
+void WebGL2RenderingContextBase::uniform2uiv(const WebGLUniformLocation* location, const FlexibleUint32ArrayView& v)
+{
+ if (isContextLost() || !validateUniformParameters<WTF::Uint32Array>("uniform2uiv", location, v, 2))
+ return;
+
+ webContext()->uniform2uiv(location->location(), v.length() >> 1, v.dataMaybeOnStack());
+}
+
void WebGL2RenderingContextBase::uniform2uiv(const WebGLUniformLocation* location, Vector<GLuint>& value)
{
if (isContextLost() || !validateUniformParameters("uniform2uiv", location, value.data(), value.size(), 2))
@@ -939,6 +955,14 @@ void WebGL2RenderingContextBase::uniform2uiv(const WebGLUniformLocation* locatio
webContext()->uniform2uiv(location->location(), value.size() / 2, value.data());
}
+void WebGL2RenderingContextBase::uniform3uiv(const WebGLUniformLocation* location, const FlexibleUint32ArrayView& v)
+{
+ if (isContextLost() || !validateUniformParameters<WTF::Uint32Array>("uniform3uiv", location, v, 3))
+ return;
+
+ webContext()->uniform3uiv(location->location(), v.length() / 3, v.dataMaybeOnStack());
+}
+
void WebGL2RenderingContextBase::uniform3uiv(const WebGLUniformLocation* location, Vector<GLuint>& value)
{
if (isContextLost() || !validateUniformParameters("uniform3uiv", location, value.data(), value.size(), 3))
@@ -947,6 +971,14 @@ void WebGL2RenderingContextBase::uniform3uiv(const WebGLUniformLocation* locatio
webContext()->uniform3uiv(location->location(), value.size() / 3, value.data());
}
+void WebGL2RenderingContextBase::uniform4uiv(const WebGLUniformLocation* location, const FlexibleUint32ArrayView& v)
+{
+ if (isContextLost() || !validateUniformParameters<WTF::Uint32Array>("uniform4uiv", location, v, 4))
+ return;
+
+ webContext()->uniform4uiv(location->location(), v.length() >> 2, v.dataMaybeOnStack());
+}
+
void WebGL2RenderingContextBase::uniform4uiv(const WebGLUniformLocation* location, Vector<GLuint>& value)
{
if (isContextLost() || !validateUniformParameters("uniform4uiv", location, value.data(), value.size(), 4))

Powered by Google App Engine
This is Rietveld 408576698