Backout changeset 3f8e99e92344 (bug 539356) because of performance and correctness regressions

This commit is contained in:
Ehsan Akhgari 2012-07-03 20:11:59 -04:00
parent 0597a14136
commit 97e14cbe68

View File

@ -488,13 +488,6 @@ gfxASurface::MovePixels(const nsIntRect& aSourceRect,
nsRefPtr<gfxASurface> tmp =
CreateSimilarSurface(GetContentType(),
gfxIntSize(aSourceRect.width, aSourceRect.height));
// CreateSimilarSurface can return nsnull if the current surface is
// in an error state. This isn't good, but its better to carry
// on with the error surface instead of crashing.
NS_ASSERTION(tmp, "Must have temporary surface to move pixels!");
if (!tmp) {
return;
}
nsRefPtr<gfxContext> ctx = new gfxContext(tmp);
ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
ctx->SetSource(this, gfxPoint(-aSourceRect.x, -aSourceRect.y));