Bug 1313541 - GetBufferSubData webidl. - r=qdot
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Tue, 11 Oct 2016 17:38:32 -0700
changeset 347053 d1786e6a99955ad21c7d9bc5d9a3ddb6f45a5f1e
parent 347052 e31eb2124b4485d204852abef10dec6cbc2650a2
child 347054 7a73165c9408039751f985d53c6495c5d8302043
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1313541
milestone52.0a1
Bug 1313541 - GetBufferSubData webidl. - r=qdot 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);