Bug 1132427 - Make sure that the first frame refresh area for an animated image gets updated based on the refresh area of all subsequent frames, not just the second. r=jrmuizel, a=lmandel
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 13 Feb 2015 02:26:41 -0600
changeset 250088 0d4ecc5c742c
parent 250087 8fd533be98aa
child 250089 97f402db19a4
push id4500
push userryanvm@gmail.com
push date2015-02-27 20:31 +0000
treeherdermozilla-beta@4564e0e22a37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, lmandel
bugs1132427
milestone37.0
Bug 1132427 - Make sure that the first frame refresh area for an animated image gets updated based on the refresh area of all subsequent frames, not just the second. r=jrmuizel, a=lmandel
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -930,20 +930,19 @@ RasterImage::OnAddedFrame(uint32_t aNewF
       // mid-decode, and thus we're decoding out of the source buffer. Since we're
       // going to fix this anyway later, and since we didn't kill the source data
       // in the old world either, locking is acceptable for the moment.
       LockImage();
 
       if (mPendingAnimation && ShouldAnimate()) {
         StartAnimation();
       }
-
-      if (aNewFrameCount > 1) {
-        mAnim->UnionFirstFrameRefreshArea(aNewRefreshArea);
-      }
+    }
+    if (aNewFrameCount > 1) {
+      mAnim->UnionFirstFrameRefreshArea(aNewRefreshArea);
     }
   }
 }
 
 nsresult
 RasterImage::SetSize(int32_t aWidth, int32_t aHeight, Orientation aOrientation)
 {
   MOZ_ASSERT(NS_IsMainThread());