Bug 1288040 (Part 3) - Get rid of RefreshResult.error, a field which nothing cares about. r=edwin
authorSeth Fowler <mark.seth.fowler@gmail.com>
Tue, 19 Jul 2016 13:37:13 -0700
changeset 331021 1f2c834df0db955921199939b3977829f976ad1f
parent 331020 34faad78d6f099f4d1a25a1c7935db5656fdf627
child 331022 b979622ece878a5eceb812a7ded7bad6fe8acbb1
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1288040
milestone50.0a1
Bug 1288040 (Part 3) - Get rid of RefreshResult.error, a field which nothing cares about. r=edwin
image/FrameAnimator.cpp
image/FrameAnimator.h
--- a/image/FrameAnimator.cpp
+++ b/image/FrameAnimator.cpp
@@ -208,33 +208,31 @@ FrameAnimator::AdvanceFrame(AnimationSta
     // Uh oh, the frame we want to show is currently being decoded (partial)
     // Wait until the next refresh driver tick and try again
     return ret;
   }
 
   // Bad data
   if (GetTimeoutForFrame(aState, nextFrameIndex) < 0) {
     ret.animationFinished = true;
-    ret.error = true;
   }
 
   if (nextFrameIndex == 0) {
     ret.dirtyRect = aState.mFirstFrameRefreshArea;
   } else {
     MOZ_ASSERT(nextFrameIndex == currentFrameIndex + 1);
 
     // Change frame
     if (!DoBlend(&ret.dirtyRect, currentFrameIndex, nextFrameIndex)) {
       // something went wrong, move on to next
       NS_WARNING("FrameAnimator::AdvanceFrame(): Compositing of frame failed");
       nextFrame->SetCompositingFailed(true);
       aState.mCurrentAnimationFrameTime = GetCurrentImgFrameEndTime(aState);
       aState.mCurrentAnimationFrameIndex = nextFrameIndex;
 
-      ret.error = true;
       return ret;
     }
 
     nextFrame->SetCompositingFailed(false);
   }
 
   aState.mCurrentAnimationFrameTime = GetCurrentImgFrameEndTime(aState);
 
--- a/image/FrameAnimator.h
+++ b/image/FrameAnimator.h
@@ -147,31 +147,25 @@ public:
     nsIntRect dirtyRect;
 
     // Whether any frame changed, and hence the dirty rect was set.
     bool frameAdvanced : 1;
 
     // Whether the animation has finished playing.
     bool animationFinished : 1;
 
-    // Whether an error has occurred when trying to advance a frame. Note that
-    // errors do not, on their own, end the animation.
-    bool error : 1;
-
     RefreshResult()
       : frameAdvanced(false)
       , animationFinished(false)
-      , error(false)
     { }
 
     void Accumulate(const RefreshResult& other)
     {
       frameAdvanced = frameAdvanced || other.frameAdvanced;
       animationFinished = animationFinished || other.animationFinished;
-      error = error || other.error;
       dirtyRect = dirtyRect.Union(other.dirtyRect);
     }
   };
 
   /**
    * Re-evaluate what frame we're supposed to be on, and do whatever blending
    * is necessary to get us to that frame.
    *