Bug 835045 - Use CreateThebesSurfaceAliasForDrawTarget_hack to avoid having multiple cairo_surface_quartz objects for a single CGContext. r=nrc, a=bajaj
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 26 Feb 2013 10:18:52 +1300
changeset 128672 5c828cb5ec46af1b74354deaa8ee00daff3b1a66
parent 128671 600ecd922820c99fbf0aa0067476379c5088df3e
child 128673 c3107b4bd85a56642257f869ae964ad1f39ec271
push id3543
push userryanvm@gmail.com
push dateThu, 21 Mar 2013 21:33:32 +0000
treeherdermozilla-aurora@5c828cb5ec46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnrc, bajaj
bugs835045
milestone21.0a2
Bug 835045 - Use CreateThebesSurfaceAliasForDrawTarget_hack to avoid having multiple cairo_surface_quartz objects for a single CGContext. r=nrc, a=bajaj
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.mDrawTarget &&
       aData.mDrawTarget->GetNativeSurface(gfx::NATIVE_SURFACE_CGCONTEXT_ACCELERATED)) {
     mDrawTarget = aData.mDrawTarget;
     mNeedsYFlip = false;
     mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height);
     return;
   } else if (aData.mDrawTarget) {
     mDrawTarget = aData.mDrawTarget;
-    mCanvasSurface = gfxPlatform::GetPlatform()->GetThebesSurfaceForDrawTarget(mDrawTarget);
+    mCanvasSurface = gfxPlatform::GetPlatform()->CreateThebesSurfaceAliasForDrawTarget_hack(mDrawTarget);
     mNeedsYFlip = false;
   } else if (aData.mSurface) {
     mCanvasSurface = aData.mSurface;
     mNeedsYFlip = false;
 #if defined(GL_PROVIDER_GLX)
     if (aData.mSurface->GetType() == gfxASurface::SurfaceTypeXlib) {
         gfxXlibSurface *xsurf = static_cast<gfxXlibSurface*>(aData.mSurface);
         mPixmap = xsurf->GetGLXPixmap();