Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman

MozReview-Commit-ID: rHhLEDZEQt
This commit is contained in:
Milan Sreckovic
2016-04-12 15:18:11 -04:00
parent 48f4370d94
commit dd0830c93c
41 changed files with 235 additions and 95 deletions

View File

@@ -174,7 +174,9 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback,
RenderTraceInvalidateStart(this, "FFFF00", state.mRegionToDraw.GetBounds());
RefPtr<gfxContext> ctx = gfxContext::ContextForDrawTarget(target);
RefPtr<gfxContext> ctx = gfxContext::ForDrawTargetWithTransform(target);
MOZ_ASSERT(ctx); // already checked the target above
PaintBuffer(ctx,
state.mRegionToDraw, state.mRegionToDraw, state.mRegionToInvalidate,
state.mDidSelfCopy,