Bug 634132 - Reset the current GL context after drawing thebes layers. r=joe a=blocking2.0
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 24 Feb 2011 09:31:49 +1300
changeset 63024 1d56b96c92a591d7597120205649de9e10ffc799
parent 63023 8476781d5d2527104cd5b77ae2ace174ae2b0183
child 63025 0de597a9766c229f357ffdce0b932df8f61f1171
push id18992
push usermwoodrow@mozilla.com
push dateWed, 23 Feb 2011 21:45:26 +0000
treeherdermozilla-central@1d56b96c92a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, blocking2
bugs634132
milestone2.0b13pre
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 634132 - Reset the current GL context after drawing thebes layers. r=joe a=blocking2.0
gfx/layers/opengl/ThebesLayerOGL.cpp
--- a/gfx/layers/opengl/ThebesLayerOGL.cpp
+++ b/gfx/layers/opengl/ThebesLayerOGL.cpp
@@ -751,16 +751,19 @@ ThebesLayerOGL::RenderLayer(int aPreviou
       // Everything that's visible has been validated. Do this instead of
       // OR-ing with aRegionToDraw, since that can lead to a very complex region
       // here (OR doesn't automatically simplify to the simplest possible
       // representation of a region.)
       mValidRegion.Or(mValidRegion, mVisibleRegion);
     }
   }
 
+  // Drawing thebes layers can change the current context, reset it.
+  gl()->MakeCurrent();
+
   DEBUG_GL_ERROR_CHECK(gl());
 
   gl()->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, aPreviousFrameBuffer);
   mBuffer->RenderTo(aOffset, mOGLManager);
   DEBUG_GL_ERROR_CHECK(gl());
 }
 
 Layer*