Bug 1313541 - GetBufferSubData webidl. - r=qdot draft
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Tue, 11 Oct 2016 17:38:32 -0700
changeset 430643 0c61ede3e34399e02f10a59b343d99e74315eac8
parent 430642 20247ddeeaa4946daadeb4f984e05fdec80ccebc
child 430644 00ce98cf4618913341f3dfb3fc2564e5db5b6857
push id33862
push userbmo:jgilbert@mozilla.com
push dateFri, 28 Oct 2016 02:14:30 +0000
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);