Bug 805002 - Flush accelerated Quartz canvas before GL composition. r=BenWa
authorMarkus Stange <mstange@themasta.com>
Wed, 24 Oct 2012 18:17:00 +0200
changeset 111394 161dd84a24fc53105aae2a707cd952946d0704f6
parent 111393 8c8c0b8e97f8cb65ecc0ede8bca5038a2743f7e2
child 111395 592c3465a74231069e07b10b2a072b54ea0f06b0
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersBenWa
bugs805002
milestone19.0a1
Bug 805002 - Flush accelerated Quartz canvas before GL composition. r=BenWa
gfx/layers/opengl/CanvasLayerOGL.cpp
--- a/gfx/layers/opengl/CanvasLayerOGL.cpp
+++ b/gfx/layers/opengl/CanvasLayerOGL.cpp
@@ -220,16 +220,17 @@ CanvasLayerOGL::UpdateSurface()
   if (mDrawTarget && mDrawTarget->GetNativeSurface(gfx::NATIVE_SURFACE_CGCONTEXT_ACCELERATED)) {
     if (!mTexture) {
       mTexture = MakeIOSurfaceTexture((CGContextRef)mDrawTarget->GetNativeSurface(
                                       gfx::NATIVE_SURFACE_CGCONTEXT_ACCELERATED),
                                       gl());
       mTextureTarget = LOCAL_GL_TEXTURE_RECTANGLE_ARB;
       mLayerProgram = gl::RGBARectLayerProgramType;
     }
+    mDrawTarget->Flush();
     return;
   }
 #endif
 
   nsRefPtr<gfxASurface> updatedAreaSurface;
   if (mCanvasGLContext) {
     gfxIntSize size(mBounds.width, mBounds.height);
     nsRefPtr<gfxImageSurface> updatedAreaImageSurface =