Bug 1194837. Don't use the inverse orientation matrix when computing the image space invalidate rect. r=seth, a=sylvestre
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 26 Sep 2015 01:26:18 -0500
changeset 296274 477bd2274afe0034c83b447611cabb0742868836
parent 296273 0cd19a713a9bd7ea3d0c4cda220adc98984258e2
child 296275 359d79628d42b0202bfd8c676e232ff832a97bc5
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth, sylvestre
bugs1194837
milestone43.0a2
Bug 1194837. Don't use the inverse orientation matrix when computing the image space invalidate rect. r=seth, a=sylvestre 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
@@ -329,17 +329,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);
 }