Bug 991767 - Use Moz2D for printing surfaces. r=roc

This commit is contained in:
Matt Woodrow 2014-04-07 16:07:12 +12:00
parent 431e385b91
commit f0f7cb8f20

View File

@ -394,7 +394,11 @@ nsDeviceContext::CreateRenderingContext(nsRenderingContext *&aContext)
#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);