mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Make resuming of decoding work for anonymous decoders.
This commit is contained in:
parent
072fbe1a93
commit
f84fdea422
3 changed files with 18 additions and 7 deletions
|
|
@ -102,22 +102,20 @@ class AnonymousDecodingTask final : public IDecodingTask
|
|||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AnonymousDecodingTask, override)
|
||||
|
||||
explicit AnonymousDecodingTask(NotNull<Decoder*> aDecoder);
|
||||
explicit AnonymousDecodingTask(NotNull<Decoder*> aDecoder, bool aResumable);
|
||||
|
||||
void Run() override;
|
||||
|
||||
bool ShouldPreferSyncRun() const override { return true; }
|
||||
TaskPriority Priority() const override { return TaskPriority::eLow; }
|
||||
|
||||
// Anonymous decoders normally get all their data at once. We have tests where
|
||||
// they don't; in these situations, the test re-runs them manually. So no
|
||||
// matter what, we don't want to resume by posting a task to the DecodePool.
|
||||
void Resume() override { }
|
||||
void Resume() override;
|
||||
|
||||
private:
|
||||
virtual ~AnonymousDecodingTask() { }
|
||||
|
||||
NotNull<RefPtr<Decoder>> mDecoder;
|
||||
bool mResumable;
|
||||
};
|
||||
|
||||
} // namespace image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue