Bug 952977: Convert SetBaseTransform to gfx::Matrix4x4 r=nical

This commit is contained in:
David Zbarsky
2014-01-27 10:28:33 -05:00
parent df33ba2acb
commit a76cd8cfcd
18 changed files with 107 additions and 45 deletions

View File

@@ -1360,11 +1360,12 @@ nsDisplayImage::ConfigureLayer(ImageLayer *aLayer, const nsIntPoint& aOffset)
const gfxRect destRect = GetDestRect();
gfxMatrix transform;
transform.Translate(destRect.TopLeft() + aOffset);
gfx::Matrix transform;
gfxPoint p = destRect.TopLeft() + aOffset;
transform.Translate(p.x, p.y);
transform.Scale(destRect.Width()/imageWidth,
destRect.Height()/imageHeight);
aLayer->SetBaseTransform(gfx3DMatrix::From2D(transform));
aLayer->SetBaseTransform(gfx::Matrix4x4::From2D(transform));
aLayer->SetVisibleRegion(nsIntRect(0, 0, imageWidth, imageHeight));
}