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 291126 6c8b58266aef1e921662344ebe1a639fc8eb6082
parent 291123 60e7dc82e89b41bea07f20e3792e7a466531e664
child 291127 92478183e19e0e279fbc8bec6a64c51f207433ad
push id934
push userraliiev@mozilla.com
push dateMon, 26 Oct 2015 12:58:05 +0000
treeherdermozilla-release@05704e35c1d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth, sylvestre
bugs1194837
milestone42.0
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);
 }