зеркало из https://github.com/mozilla/gecko-dev.git
Bug 991575 - Stop PresShell::GetReferenceRenderingContext from creating a Thebes backed gfxContext (Moz2D migration). r=mattwoodrow
This commit is contained in:
Родитель
00e3bb9eeb
Коммит
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));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче