Bug 1250710 - Add stub. - r=jrmuizel draft
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 14 Jun 2016 09:01:43 -0700
changeset 379630 5478c80e19f3f8be0c9dca8691852c95d82f4ad8
parent 379629 e291b4146d1a1783e057cc8d99077c1474506160
child 379631 24ecc5eba5f30652fe5c6d1d27f4a245fd4425f8
push id21016
push userbmo:jgilbert@mozilla.com
push dateThu, 16 Jun 2016 14:33:55 +0000
reviewersjrmuizel
bugs1250710
milestone50.0a1
Bug 1250710 - Add stub. - r=jrmuizel MozReview-Commit-ID: B555z5b3pyx
dom/canvas/WebGL2Context.h
dom/canvas/WebGL2ContextBuffers.cpp
--- a/dom/canvas/WebGL2Context.h
+++ b/dom/canvas/WebGL2Context.h
@@ -50,16 +50,18 @@ private:
     template<typename BufferT>
     void GetBufferSubDataT(GLenum target, GLintptr offset, const BufferT& data);
 
 public:
     void GetBufferSubData(GLenum target, GLintptr offset,
                           const dom::Nullable<dom::ArrayBuffer>& maybeData);
     void GetBufferSubData(GLenum target, GLintptr offset,
                           const dom::SharedArrayBuffer& data);
+    void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
+                    GLenum type, GLintptr offset);
 
 
     // -------------------------------------------------------------------------
     // Framebuffer objects - WebGL2ContextFramebuffers.cpp
 
     void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
                          GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
                          GLbitfield mask, GLenum filter);
--- a/dom/canvas/WebGL2ContextBuffers.cpp
+++ b/dom/canvas/WebGL2ContextBuffers.cpp
@@ -241,9 +241,20 @@ void WebGL2Context::GetBufferSubData(GLe
 }
 
 void WebGL2Context::GetBufferSubData(GLenum target, GLintptr offset,
                                      const dom::SharedArrayBuffer& data)
 {
     GetBufferSubDataT(target, offset, data);
 }
 
+void
+WebGL2Context::ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
+                          GLenum type, GLintptr offset)
+{
+    const char funcName[] = "readPixels";
+    if (IsContextLost())
+        return;
+
+    ErrorInvalidOperation("%s: Not yet implemented.", funcName);
+}
+
 } // namespace mozilla