Bug 1282275 - Return IDecodingTask objects instead of Decoder objects from most DecoderFactory functions. r=dholbert
This commit is contained in:
@@ -47,6 +47,9 @@ public:
|
||||
/// DecodePool. Subclasses can override this if they need different behavior.
|
||||
void Resume() override;
|
||||
|
||||
/// @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.
|
||||
@@ -74,6 +77,8 @@ public:
|
||||
// don't block layout or page load.
|
||||
TaskPriority Priority() const override { return TaskPriority::eLow; }
|
||||
|
||||
NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
|
||||
|
||||
private:
|
||||
virtual ~DecodingTask() { }
|
||||
|
||||
@@ -102,6 +107,8 @@ public:
|
||||
// page load.
|
||||
TaskPriority Priority() const override { return TaskPriority::eHigh; }
|
||||
|
||||
NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
|
||||
|
||||
private:
|
||||
virtual ~MetadataDecodingTask() { }
|
||||
|
||||
@@ -130,6 +137,8 @@ public:
|
||||
// matter what, we don't want to resume by posting a task to the DecodePool.
|
||||
void Resume() override { }
|
||||
|
||||
NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
|
||||
|
||||
private:
|
||||
virtual ~AnonymousDecodingTask() { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user