Bug 991767 - Use Moz2D for printing surfaces. r=roc, a=sledru
☠☠ backed out by 8d21ce8b440a ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 07 Apr 2014 16:07:12 +1200
changeset 183705 5be8148fea1f002fae2f286dff5785cff8656998
parent 183704 eaf92a872145643b29d4fd6849720abea7027eb9
child 183706 8d21ce8b440a1755a53494dd099e37b4e22d45ab
push id3453
push userryanvm@gmail.com
push dateFri, 11 Apr 2014 16:50:59 +0000
treeherdermozilla-beta@5be8148fea1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sledru
bugs991767
milestone29.0
Bug 991767 - Use Moz2D for printing surfaces. r=roc, a=sledru
gfx/src/nsDeviceContext.cpp
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -400,17 +400,21 @@ nsDeviceContext::CreateRenderingContext(
     // and EndPage().  But we can get away with fudging things here, if need
     // be, by using a cached copy.
     if (!printingSurface) {
       printingSurface = mCachedPrintingSurface;
     }
 #endif
     nsRefPtr<nsRenderingContext> pContext = new nsRenderingContext();
 
-    pContext->Init(this, printingSurface);
+    RefPtr<gfx::DrawTarget> dt =
+      gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(printingSurface,
+                                                             gfx::IntSize(mWidth, mHeight));
+
+    pContext->Init(this, dt);
     pContext->Scale(mPrintingScale, mPrintingScale);
     aContext = pContext;
     NS_ADDREF(aContext);
 
     return NS_OK;
 }
 
 nsresult