Bug 725105 - Fix the single-buffered (i.e., not default) case in LayerManagerOGL. r=bjacob
authorJoe Drew <joe@drew.ca>
Mon, 07 May 2012 17:46:25 -0400
changeset 93417 571e46266e96c2fd89d7253475b7cfd8a8d96b6b
parent 93416 991d6c9dc2d927d34f3f37b9085e80c1322e9828
child 93418 6f6ba1e4eae22e0bfd2d4f56007fe4e2529be5a9
push id22634
push useremorley@mozilla.com
push dateTue, 08 May 2012 09:48:43 +0000
treeherdermozilla-central@e4f9e2eab6b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs725105
milestone15.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 725105 - Fix the single-buffered (i.e., not default) case in LayerManagerOGL. r=bjacob
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -893,23 +893,22 @@ LayerManagerOGL::Render()
                          -(top * 2.0f - 1.0f),
                          right * 2.0f - 1.0f,
                          -(top * 2.0f - 1.0f),
                          left * 2.0f - 1.0f,
                          -(bottom * 2.0f - 1.0f),
                          right * 2.0f - 1.0f,
                          -(bottom * 2.0f - 1.0f) };
 
-    // Use flipped texture coordinates since our
-    // projection matrix also has a flip and we
-    // need to cancel that out.
-    float coords[] = { left, bottom,
-                       right, bottom,
-                       left, top,
-                       right, top };
+    // Use inverted texture coordinates since our projection matrix also has a
+    // flip and we need to cancel that out.
+    float coords[] = { left, 1 - top,
+                       right, 1 - top,
+                       left, 1 - bottom,
+                       right, 1 - bottom };
 
     mGLContext->fVertexAttribPointer(vcattr,
                                      2, LOCAL_GL_FLOAT,
                                      LOCAL_GL_FALSE,
                                      0, vertices);
 
     mGLContext->fVertexAttribPointer(tcattr,
                                      2, LOCAL_GL_FLOAT,