Bug 1287691 (Part 4) - Leave notifying decoding progress for each frame to DecodingTask. r=edwin

This commit is contained in:
Seth Fowler 2016-07-18 23:53:20 -07:00
Родитель 78f3ee9ee6
Коммит c4e69d01bb
3 изменённых файлов: 2 добавлений и 13 удалений

Просмотреть файл

@ -447,12 +447,6 @@ Decoder::PostFrameStop(Opacity aFrameOpacity
mInvalidRect.UnionRect(mInvalidRect,
gfx::IntRect(gfx::IntPoint(0, 0), GetSize()));
}
// If we are going to keep decoding we should notify now about the first frame being done.
if (mImage && mFrameCount == 1 && HasAnimation()) {
MOZ_ASSERT(HasProgress());
IDecodingTask::NotifyProgress(WrapNotNull(this));
}
}
void

Просмотреть файл

@ -19,8 +19,8 @@ namespace image {
// Helpers for sending notifications to the image associated with a decoder.
///////////////////////////////////////////////////////////////////////////////
/* static */ void
IDecodingTask::NotifyProgress(NotNull<Decoder*> aDecoder)
static void
NotifyProgress(NotNull<Decoder*> aDecoder)
{
MOZ_ASSERT(aDecoder->HasProgress() && !aDecoder->IsMetadataDecode());

Просмотреть файл

@ -50,11 +50,6 @@ public:
/// @return a non-null weak pointer to the Decoder associated with this task.
virtual NotNull<Decoder*> GetDecoder() const = 0;
// Notify the Image associated with a Decoder of its progress, sending a
// runnable to the main thread if necessary.
// XXX(seth): This is a hack that will be removed soon.
static void NotifyProgress(NotNull<Decoder*> aDecoder);
protected:
virtual ~IDecodingTask() { }
};