Bug 740580 - Follow-up for fix incorrect rebasing. mDestRect should have been destRect.

This commit is contained in:
Matt Woodrow 2013-08-27 16:51:37 +12:00
parent 4b89de8370
commit 25c513e3f0

View File

@ -221,12 +221,12 @@ nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
if (dest->IsCairo()) {
nsRefPtr<gfxASurface> destSurf = dest->CurrentSurface();
if (surf && surf->GetType() == destSurf->GetType()) {
BlitSurface(dest, mDestRect, surf);
BlitSurface(dest, destRect, surf);
return;
}
surf = destSurf->CreateSimilarSurface(
gfxASurface::CONTENT_COLOR_ALPHA,
gfxIntSize(ceil(mDestRect.width), ceil(mDestRect.height)));
gfxIntSize(ceil(destRect.width), ceil(destRect.height)));
} else {
if (surf) {
mozilla::gfx::DrawTarget* dt = dest->GetDrawTarget();
@ -235,13 +235,13 @@ nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
if (source) {
// Could be non-integer pixel alignment
dt->DrawSurface(source,
mozilla::gfx::Rect(mDestRect.x, mDestRect.y, mDestRect.width, mDestRect.height),
mozilla::gfx::Rect(0, 0, mDestRect.width, mDestRect.height));
mozilla::gfx::Rect(destRect.x, destRect.y, destRect.width, destRect.height),
mozilla::gfx::Rect(0, 0, destRect.width, destRect.height));
return;
}
}
surf = gfxPlatform::GetPlatform()->CreateOffscreenImageSurface(
gfxIntSize(ceil(mDestRect.width), ceil(mDestRect.height)),
gfxIntSize(ceil(destRect.width), ceil(destRect.height)),
gfxASurface::CONTENT_COLOR_ALPHA);
}
if (surf) {