Bug 716140 - Count complete frames in Decoder::Finish(), not just whatever frame objects mImage has. r=seth
authorJoe Drew <joe@drew.ca>
Thu, 07 Feb 2013 17:23:44 -0500
changeset 125632 c86eb1ff89168e43b8668fc41f3e22f3c0eb5fbd
parent 125631 ef71ebfb90a03ab8921c5c2ec024129d545e25d5
child 125633 682938749810c2effd0aede42b7a25c7a055133b
push id1444
push userryanvm@gmail.com
push dateThu, 21 Mar 2013 13:56:20 +0000
treeherderfx-team@a73a2b5c423b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs716140
milestone22.0a1
Bug 716140 - Count complete frames in Decoder::Finish(), not just whatever frame objects mImage has. r=seth
image/src/Decoder.cpp
--- a/image/src/Decoder.cpp
+++ b/image/src/Decoder.cpp
@@ -116,18 +116,18 @@ Decoder::Finish(RasterImage::eShutdownIn
                          "Image", mImage.InnerWindowID()
                        ))) {
         consoleService->LogMessage(errorObject);
       }
     }
 
     bool usable = true;
     if (aShutdownIntent != RasterImage::eShutdownIntent_NotNeeded && !HasDecoderError()) {
-      // If we only have a data error, we're usable if we have at least one frame.
-      if (mImage.GetNumFrames() == 0) {
+      // If we only have a data error, we're usable if we have at least one complete frame.
+      if (GetCompleteFrameCount() == 0) {
         usable = false;
       }
     }
 
     // If we're usable, do exactly what we should have when the decoder
     // completed.
     if (usable) {
       PostDecodeDone();