@@ -197,13 +197,6 @@ class Decoder {
197197 }
198198 bool IsMetadataDecode () const { return mMetadataDecode ; }
199199
200- /* *
201- * Should we return how many frames we expect are in the animation.
202- */
203- bool WantsFrameCount () const {
204- return bool (mDecoderFlags & DecoderFlags::COUNT_FRAMES);
205- }
206-
207200 /* *
208201 * Sets the output size of this decoder. If this is smaller than the intrinsic
209202 * size of the image, we'll downscale it while decoding. For memory usage
@@ -307,7 +300,7 @@ class Decoder {
307300 // / useless?
308301 bool GetDecodeDone () const {
309302 return mReachedTerminalState || mDecodeDone ||
310- (mMetadataDecode && HasSize () && ! WantsFrameCount () ) || HasError ();
303+ (mMetadataDecode && HasSize ()) || HasError ();
311304 }
312305
313306 // / Are we in the middle of a frame right now? Used for assertions only.
@@ -512,10 +505,6 @@ class Decoder {
512505 // we advance to the next frame.
513506 void PostIsAnimated (FrameTimeout aFirstFrameTimeout);
514507
515- // Called by decoders if they determine the expected frame count.
516- // @param aFrameCount The expected frame count.
517- void PostFrameCount (uint32_t aFrameCount);
518-
519508 // Called by decoders when they end a frame. Informs the image, sends
520509 // notifications, and does internal book-keeping.
521510 // Specify whether this frame is opaque as an optimization.
@@ -538,16 +527,15 @@ class Decoder {
538527 const OrientedIntRect& aRect,
539528 const Maybe<OrientedIntRect>& aRectAtOutputSize = Nothing());
540529
541- // For animated images, specify the loop count. -1 means loop forever, 0
542- // means a single iteration, stopping on the last frame.
543- void PostLoopCount (int32_t aLoopCount);
544-
545530 // Called by the decoders when they have successfully decoded the image. This
546531 // may occur as the result of the decoder getting to the appropriate point in
547532 // the stream, or by us calling FinishInternal().
548533 //
549534 // May not be called mid-frame.
550- void PostDecodeDone ();
535+ //
536+ // For animated images, specify the loop count. -1 means loop forever, 0
537+ // means a single iteration, stopping on the last frame.
538+ void PostDecodeDone (int32_t aLoopCount = 0 );
551539
552540 /* *
553541 * Allocates a new frame, making it our current frame if successful.
0 commit comments