Bug 809493 - Restore the blend equation state after drawing the underlay. r=joe
authorBenoit Girard <b56girard@gmail.com>
Thu, 08 Nov 2012 10:10:51 -0500
changeset 112688 f8989ca9a3c6ab5e161932e22f645e392964ab37
parent 112687 c1d783e19750d3ede754bcea409b71a933306b2e
child 112689 bfd200dfc8c360b8f13cb68204de97ad18891d76
push id23835
push userryanvm@gmail.com
push dateFri, 09 Nov 2012 00:52:02 +0000
treeherdermozilla-central@27ae6c86237f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe
bugs809493
milestone19.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 809493 - Restore the blend equation state after drawing the underlay. r=joe
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -987,16 +987,20 @@ LayerManagerOGL::Render()
 #ifndef MOZ_ANDROID_OMTC
   mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
   mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
 #endif
 
   // Allow widget to render a custom background.
   mWidget->DrawWindowUnderlay(this, rect);
 
+  // Reset some state that might of been clobbered by the underlay.
+  mGLContext->fBlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA,
+                                 LOCAL_GL_ONE, LOCAL_GL_ONE);
+
   // Render our layers.
   RootLayer()->RenderLayer(mGLContext->IsDoubleBuffered() ? 0 : mBackBufferFBO,
                            nsIntPoint(0, 0));
 
   // Allow widget to render a custom foreground too.
   mWidget->DrawWindowOverlay(this, rect);
 
 #ifdef MOZ_DUMP_PAINTING