Bug 637852. Part 24: Fix scale/translate order in DrawThebesLayer. r=tnikkel

This commit is contained in:
Robert O'Callahan
2011-06-23 00:11:28 +12:00
parent 1f7b4e5dc9
commit b4694dcffb
4 changed files with 32 additions and 1 deletions

View File

@@ -2041,11 +2041,11 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
// ThebesLayer
gfxContextMatrixAutoSaveRestore saveMatrix(aContext);
nsIntPoint offset = GetTranslationForThebesLayer(aLayer);
aContext->Scale(userData->mXScale, userData->mYScale);
// Apply the residual transform if it has been enabled, to ensure that
// snapping when we draw into aContext exactly matches the ideal transform.
// See above for why this is OK.
aContext->Translate(aLayer->GetResidualTranslation() - gfxPoint(offset.x, offset.y));
aContext->Scale(userData->mXScale, userData->mYScale);
nsPresContext* presContext = containerLayerFrame->PresContext();
PRInt32 appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();