Bug 970294 - Set our surface offset as a gfxContext device offset instead of a transform so that other callers don't accidentally overwrite it. r=nrc

This commit is contained in:
Matt Woodrow
2014-02-28 12:32:38 +13:00
parent 16c1e76108
commit b0af971a01
3 changed files with 7 additions and 6 deletions

View File

@@ -961,8 +961,8 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
return;
}
nsRefPtr<gfxContext> groupTarget = new gfxContext(untransformedDT);
groupTarget->Translate(gfxPoint(-bounds.x, -bounds.y));
nsRefPtr<gfxContext> groupTarget = new gfxContext(untransformedDT,
Point(bounds.x, bounds.y));
PaintSelfOrChildren(paintLayerContext, groupTarget);
@@ -978,8 +978,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
(aLayer->GetDebugColorIndex() & 4) ? 1.0 : 0.0,
1.0);
nsRefPtr<gfxContext> temp = new gfxContext(untransformedDT);
temp->Translate(gfxPoint(-bounds.x, -bounds.y));
nsRefPtr<gfxContext> temp = new gfxContext(untransformedDT, Point(bounds.x, bounds.y));
temp->SetColor(color);
temp->Paint();
}