Bug 513749 - Mismerge/thinko makes animated images do extra work. r=bholley
authorJoe Drew <joe@drew.ca>
Wed, 02 Sep 2009 11:48:23 -0400
changeset 32163 a1c45ec0d5d5859a7c1628016a6aa03d51aa4c60
parent 32162 08c42708aad8efe15e96f2cb5a87d65fc132e124
child 32164 1fa7bd42a36c1aee109a5968af84a6bfc8d155cd
push id8889
push userjdrew@mozilla.com
push dateWed, 02 Sep 2009 15:51:09 +0000
treeherdermozilla-central@1fa7bd42a36c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs513749
milestone1.9.3a1pre
Bug 513749 - Mismerge/thinko makes animated images do extra work. r=bholley
modules/libpr0n/src/imgContainer.cpp
--- a/modules/libpr0n/src/imgContainer.cpp
+++ b/modules/libpr0n/src/imgContainer.cpp
@@ -1199,29 +1199,30 @@ nsresult imgContainer::DoComposite(imgFr
       default:
         // Copy previous frame into compositingFrame before we put the new frame on top
         // Assumes that the previous frame represents a full frame (it could be
         // smaller in size than the container, as long as the frame before it erased
         // itself)
         // Note: Frame 1 never gets into DoComposite(), so (aNextFrameIndex - 1) will
         // always be a valid frame number.
         if (mAnim->lastCompositedFrameIndex != aNextFrameIndex - 1) {
-          if (isFullPrevFrame && !aPrevFrame->GetIsPaletted())
+          if (isFullPrevFrame && !aPrevFrame->GetIsPaletted()) {
             // Just copy the bits
             CopyFrameImage(aPrevFrame, mAnim->compositingFrame);
           } else {
             if (needToBlankComposite) {
               // Only blank composite when prev is transparent or not full.
               if (aPrevFrame->GetHasAlpha() || !isFullPrevFrame) {
                 ClearFrame(mAnim->compositingFrame);
               }
             }
             DrawFrameTo(aPrevFrame, mAnim->compositingFrame, prevFrameRect);
           }
         }
+    }
   } else if (needToBlankComposite) {
     // If we just created the composite, it could have anything in it's
     // buffers. Clear them
     ClearFrame(mAnim->compositingFrame);
   }
 
   // Check if the frame we are composing wants the previous image restored afer
   // it is done. Don't store it (again) if last frame wanted its image restored