From f0f7cb8f20798b5c857d8adebcf7f9c28d034994 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Mon, 7 Apr 2014 16:07:12 +1200 Subject: [PATCH] Bug 991767 - Use Moz2D for printing surfaces. r=roc --- gfx/src/nsDeviceContext.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp index e2a75575cd2..8c03dde3f3d 100644 --- a/gfx/src/nsDeviceContext.cpp +++ b/gfx/src/nsDeviceContext.cpp @@ -394,7 +394,11 @@ nsDeviceContext::CreateRenderingContext(nsRenderingContext *&aContext) #endif nsRefPtr pContext = new nsRenderingContext(); - pContext->Init(this, printingSurface); + RefPtr dt = + gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(printingSurface, + gfx::IntSize(mWidth, mHeight)); + + pContext->Init(this, dt); pContext->Scale(mPrintingScale, mPrintingScale); aContext = pContext; NS_ADDREF(aContext);