Bug 1250710 - Add stub. - r=ethlin
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 14 Jun 2016 09:01:43 -0700
changeset 305264 626fa1c3e88c2946efeb526d1beddc444f454404
parent 305263 2dee8c10e5071a9dd2bc12a713b3e1f099dc0c31
child 305265 cb9ec5bb8bcc67eaac9aba306347869b9a38972d
push id79535
push userjgilbert@mozilla.com
push dateMon, 18 Jul 2016 04:46:14 +0000
treeherdermozilla-inbound@b658098634b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersethlin
bugs1250710
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1250710 - Add stub. - r=ethlin MozReview-Commit-ID: B555z5b3pyx
dom/canvas/WebGL2Context.h
dom/canvas/WebGL2ContextBuffers.cpp
--- a/dom/canvas/WebGL2Context.h
+++ b/dom/canvas/WebGL2Context.h
@@ -50,17 +50,26 @@ 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, WebGLsizeiptr offset, ErrorResult& out_error);
 
+    void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
+                    GLenum format, GLenum type,
+                    const dom::Nullable<dom::ArrayBufferView>& pixels,
+                    ErrorResult& out_error)
+    {
+        WebGLContext::ReadPixels(x, y, width, height, format, type, pixels, out_error);
+    }
 
     // -------------------------------------------------------------------------
     // 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);
     void FramebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture* texture, GLint level, GLint layer);
--- 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