Bug 1313541 - GetBufferSubData webidl. - r=qdot, a=gchang
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Tue, 11 Oct 2016 17:38:32 -0700
changeset 439977 9db4213007d93076c10f2fd954830344974185fb
parent 439976 f83d9fa111a18732b271b772575bc810b7d5d751
child 439978 827e25dec6e18e17afc66749c7a591feae61eb8e
push id36143
push userjkingston@mozilla.com
push dateWed, 16 Nov 2016 22:20:38 +0000
reviewersqdot, gchang
bugs1313541
milestone51.0a2
Bug 1313541 - GetBufferSubData webidl. - r=qdot, a=gchang MozReview-Commit-ID: LJpKP5ITlay
dom/webidl/WebGL2RenderingContext.webidl
--- a/dom/webidl/WebGL2RenderingContext.webidl
+++ b/dom/webidl/WebGL2RenderingContext.webidl
@@ -327,17 +327,21 @@ interface WebGL2RenderingContext : WebGL
     // 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);
+    // 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.
+    void getBufferSubData(GLenum target, GLintptr srcByteOffset, ArrayBufferView dstData,
+                          optional GLuint dstOffset = 0, optional GLuint length = 0);
 
     [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.
     void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
                     GLenum type, ArrayBufferView dstData, optional GLuint dstOffset = 0);