Bug 1313541 - Buffer[Sub]Data webidl. - r=qdot, a=gchang
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Tue, 11 Oct 2016 15:40:05 -0700
changeset 439974 4031945696c24b704d132cddf96990ccd1eb8b15
parent 439973 a99e419681e5c1ea4cf371015785ce136c82a53f
child 439975 9ee2e73a7312b52ff928569441d1b67d6d12bff0
push id36143
push userjkingston@mozilla.com
push dateWed, 16 Nov 2016 22:20:38 +0000
reviewersqdot, gchang
bugs1313541
milestone51.0a2
Bug 1313541 - Buffer[Sub]Data webidl. - r=qdot, a=gchang MozReview-Commit-ID: HBfrYnvfBcz
dom/webidl/WebGL2RenderingContext.webidl
--- a/dom/webidl/WebGL2RenderingContext.webidl
+++ b/dom/webidl/WebGL2RenderingContext.webidl
@@ -311,16 +311,30 @@ interface WebGL2RenderingContext : WebGL
     const GLenum TEXTURE_IMMUTABLE_LEVELS                      = 0x82DF;
 
     const GLint64 TIMEOUT_IGNORED                              = -1;
 
     /* WebGL-specific enums */
     const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL                 = 0x9247;
 
     /* Buffer objects */
+    // WebGL1:
+    void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
+    void bufferData(GLenum target, ArrayBufferView data, GLenum usage);
+    void bufferData(GLenum target, ArrayBuffer? data, GLenum usage);
+    void bufferData(GLenum target, SharedArrayBuffer data, GLenum usage);
+    void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data);
+    void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data);
+    void bufferSubData(GLenum target, GLintptr offset, SharedArrayBuffer data);
+    // WebGL2:
+    void bufferData(GLenum target, ArrayBufferView srcData, GLenum usage, GLuint srcOffset,
+                    optional GLuint length = 0);
+    void bufferSubData(GLenum target, GLintptr dstByteOffset, ArrayBufferView srcData,
+                       GLuint srcOffset, optional GLuint length = 0);
+
     void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
                            GLintptr writeOffset, GLsizeiptr size);
     void getBufferSubData(GLenum target, GLintptr offset, ArrayBufferView dstData);
 
     [Throws] // Throws on readback in a write-only context.
     void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
                     GLenum type, GLintptr offset);
     [Throws] // Throws on readback in a write-only context.