mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 991575 - Stop PresShell::GetReferenceRenderingContext from creating a Thebes backed gfxContext (Moz2D migration). r=mattwoodrow
This commit is contained in:
parent
00e3bb9eeb
commit
2b13f3c0b0
@ -83,6 +83,13 @@ nsRenderingContext::Init(nsDeviceContext* aContext,
|
||||
mP2A = mDeviceContext->AppUnitsPerDevPixel();
|
||||
}
|
||||
|
||||
void
|
||||
nsRenderingContext::Init(nsDeviceContext* aContext,
|
||||
DrawTarget* aDrawTarget)
|
||||
{
|
||||
Init(aContext, new gfxContext(aDrawTarget));
|
||||
}
|
||||
|
||||
//
|
||||
// graphics state
|
||||
//
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
|
||||
void Init(nsDeviceContext* aContext, gfxASurface* aThebesSurface);
|
||||
void Init(nsDeviceContext* aContext, gfxContext* aThebesContext);
|
||||
void Init(nsDeviceContext* aContext, DrawTarget* aDrawTarget);
|
||||
|
||||
// These accessors will never return null.
|
||||
gfxContext *ThebesContext() { return mThebes; }
|
||||
|
@ -2901,7 +2901,7 @@ PresShell::GetReferenceRenderingContext()
|
||||
nsRefPtr<nsRenderingContext> rc;
|
||||
if (mPresContext->IsScreen()) {
|
||||
rc = new nsRenderingContext();
|
||||
rc->Init(devCtx, gfxPlatform::GetPlatform()->ScreenReferenceSurface());
|
||||
rc->Init(devCtx, gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
|
||||
} else {
|
||||
devCtx->CreateRenderingContext(*getter_AddRefs(rc));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user