Bug 1287691 (Part 4) - Leave notifying decoding progress for each frame to DecodingTask. r=edwin
This commit is contained in:
@@ -447,12 +447,6 @@ Decoder::PostFrameStop(Opacity aFrameOpacity
|
|||||||
mInvalidRect.UnionRect(mInvalidRect,
|
mInvalidRect.UnionRect(mInvalidRect,
|
||||||
gfx::IntRect(gfx::IntPoint(0, 0), GetSize()));
|
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
|
void
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ namespace image {
|
|||||||
// Helpers for sending notifications to the image associated with a decoder.
|
// Helpers for sending notifications to the image associated with a decoder.
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/* static */ void
|
static void
|
||||||
IDecodingTask::NotifyProgress(NotNull<Decoder*> aDecoder)
|
NotifyProgress(NotNull<Decoder*> aDecoder)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aDecoder->HasProgress() && !aDecoder->IsMetadataDecode());
|
MOZ_ASSERT(aDecoder->HasProgress() && !aDecoder->IsMetadataDecode());
|
||||||
|
|
||||||
|
|||||||
@@ -50,11 +50,6 @@ public:
|
|||||||
/// @return a non-null weak pointer to the Decoder associated with this task.
|
/// @return a non-null weak pointer to the Decoder associated with this task.
|
||||||
virtual NotNull<Decoder*> GetDecoder() const = 0;
|
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:
|
protected:
|
||||||
virtual ~IDecodingTask() { }
|
virtual ~IDecodingTask() { }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user