Bug 1313541 - GetBufferSubData webidl. - r=qdot
MozReview-Commit-ID: LJpKP5ITlay
--- 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);