diff --git a/gfx/src/thebes/nsThebesImage.cpp b/gfx/src/thebes/nsThebesImage.cpp index a9d4390f0a5..33127841d86 100644 --- a/gfx/src/thebes/nsThebesImage.cpp +++ b/gfx/src/thebes/nsThebesImage.cpp @@ -392,8 +392,8 @@ nsThebesImage::Draw(nsIRenderingContext &aContext, * have to pre-downscale any image that would fall outside of a scaled 16-bit * coordinate space. */ - if (aDestRect.pos.x * (1.0 / xscale) > 32768.0 || - aDestRect.pos.y * (1.0 / yscale) > 32768.0) + if (aDestRect.pos.x * (1.0 / xscale) >= 32768.0 || + aDestRect.pos.y * (1.0 / yscale) >= 32768.0) { gfxIntSize dim(NS_lroundf(destRect.size.width), NS_lroundf(destRect.size.height));