Bug 1059807 - Mark OSX printing surfaces as being write-only. r=roc, a=lmandel
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 03 Sep 2014 14:40:42 +1200
changeset 216699 7b689c3657e4
parent 216698 dbfd31597299
child 216700 5638564e0d94
push id3883
push userryanvm@gmail.com
push date2014-09-11 20:34 +0000
treeherdermozilla-beta@d4082d3a082c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lmandel
bugs1059807
milestone33.0
Bug 1059807 - Mark OSX printing surfaces as being write-only. r=roc, a=lmandel
gfx/src/nsDeviceContext.cpp
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -394,16 +394,20 @@ nsDeviceContext::CreateRenderingContext(
     }
 #endif
     nsRefPtr<nsRenderingContext> pContext = new nsRenderingContext();
 
     RefPtr<gfx::DrawTarget> dt =
       gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(printingSurface,
                                                              gfx::IntSize(mWidth, mHeight));
 
+#ifdef XP_MACOSX
+    dt->AddUserData(&gfxContext::sDontUseAsSourceKey, dt, nullptr);
+#endif
+
     pContext->Init(this, dt);
     pContext->ThebesContext()->SetFlag(gfxContext::FLAG_DISABLE_SNAPPING);
     pContext->Scale(mPrintingScale, mPrintingScale);
 
     return pContext.forget();
 }
 
 nsresult