Bug 1194837. Don't use the inverse orientation matrix when computing the image space invalidate rect. r=seth
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 26 Sep 2015 01:26:18 -0500
changeset 300027 d3362879b8b1865812f2ec8c062d7ddd264bf8ac
parent 300026 870329114ced41ce3d057482e172753462e5126f
child 300028 3e9783023fb2091856dbe5407c5c0a3fc3220386
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1194837
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1194837. Don't use the inverse orientation matrix when computing the image space invalidate rect. r=seth The orientation matrix converts from decoded image space to oriented image space. The invalidation rect is in decoded image space. So we need to use the orientation matrix to convert it to oriented image space, not it's inverse.
image/OrientedImage.cpp
--- a/image/OrientedImage.cpp
+++ b/image/OrientedImage.cpp
@@ -339,17 +339,17 @@ OrientedImage::GetImageSpaceInvalidation
   nsresult rv = InnerImage()->GetWidth(&innerSize.width);
   rv = NS_FAILED(rv) ? rv : InnerImage()->GetHeight(&innerSize.height);
   if (NS_FAILED(rv)) {
     // Fall back to identity if the width and height aren't available.
     return rect;
   }
 
   // Transform the invalidation rect into the correct orientation.
-  gfxMatrix matrix(OrientationMatrix(innerSize, /* aInvert = */ true));
+  gfxMatrix matrix(OrientationMatrix(innerSize));
   gfxRect invalidRect(matrix.TransformBounds(gfxRect(rect.x, rect.y,
                                                      rect.width, rect.height)));
   invalidRect.RoundOut();
 
   return nsIntRect(invalidRect.x, invalidRect.y,
                    invalidRect.width, invalidRect.height);
 }