Bug 788408 - Part 1. fReadPixels should also respect mFlipped. r=mattwoodrow
authorKan-Ru Chen (陳侃如) <kanru@kanru.info>
Tue, 02 Oct 2012 10:42:09 +0800
changeset 108963 167652a318656a885cbdf574abe30f06d139098f
parent 108962 aa73f5544e07d0ad205db239251812e3a1423e17
child 108964 1ca8706715d0814aec4fded5a9158e4f3a1e93f6
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersmattwoodrow
bugs788408
milestone18.0a1
Bug 788408 - Part 1. fReadPixels should also respect mFlipped. r=mattwoodrow
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -2626,17 +2626,17 @@ public:
     void fReadBuffer(GLenum mode) {
         BEFORE_GL_CALL;
         mSymbols.fReadBuffer(mode);
         AFTER_GL_CALL;
     }
 
     void raw_fReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) {
         BEFORE_GL_CALL;
-        mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
+        mSymbols.fReadPixels(x, FixYValue(y, height), width, height, format, type, pixels);
         AFTER_GL_CALL;
     }
 
     void fSampleCoverage(GLclampf value, realGLboolean invert) {
         BEFORE_GL_CALL;
         mSymbols.fSampleCoverage(value, invert);
         AFTER_GL_CALL;
     }