Bug 988309 - Add nsRenderingContext constructor for a DrawTarget. r=roc

This commit is contained in:
Matt Woodrow 2014-04-07 15:47:06 +12:00
parent 3069d36554
commit 165deba580
2 changed files with 8 additions and 0 deletions

View File

@ -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
//

View File

@ -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; }