Bug 739095 - Offscreen context without offscreen texture does not need YFlip. r=jgilbert
authorOleg Romashin <romaxa@gmail.com>
Mon, 26 Mar 2012 12:56:10 -0400
changeset 93681 f65ae1a9074dee9a64ec8ba9a1cf0a2af6f56b47
parent 93680 6b3d2762c0fb8b7176d8efbe2bdea5b1a4d8e774
child 93682 82fe9c59db85fab8bc7a9c090f611ba62b90a8f8
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs739095
milestone14.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 739095 - Offscreen context without offscreen texture does not need YFlip. r=jgilbert
gfx/layers/opengl/CanvasLayerOGL.cpp
--- a/gfx/layers/opengl/CanvasLayerOGL.cpp
+++ b/gfx/layers/opengl/CanvasLayerOGL.cpp
@@ -111,17 +111,17 @@ CanvasLayerOGL::Initialize(const Data& a
     if (!aData.mGLContext->IsOffscreen()) {
       NS_WARNING("CanvasLayerOGL with a non-offscreen GL context given");
       return;
     }
 
     mCanvasGLContext = aData.mGLContext;
     mGLBufferIsPremultiplied = aData.mGLBufferIsPremultiplied;
 
-    mNeedsYFlip = true;
+    mNeedsYFlip = mCanvasGLContext->GetOffscreenTexture() != 0;
   } else {
     NS_WARNING("CanvasLayerOGL::Initialize called without surface or GL context!");
     return;
   }
 
   mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height);
       
   // Check the maximum texture size supported by GL. glTexImage2D supports