blob: eb059d7625c2651bb407379aef013c3065be9219 [file] [log] [blame]
mtkleinf6139f72014-12-12 16:41:12 -08001#ifndef DMImageTask_DEFINED
2#define DMImageTask_DEFINED
3
4#include "DMReporter.h"
5#include "DMTask.h"
6#include "DMTaskRunner.h"
7#include "SkData.h"
8#include "SkString.h"
9
10// Decode an image into its natural bitmap, perhaps decoding random subsets.
11
12namespace DM {
13
14class ImageTask : public CpuTask {
15public:
16 ImageTask(Reporter*, TaskRunner*, const SkData*, SkString name, int subsets = 0);
17
18 void draw() SK_OVERRIDE;
19 bool shouldSkip() const SK_OVERRIDE { return false; }
20 SkString name() const SK_OVERRIDE { return fName; }
21
22private:
23 SkAutoTUnref<const SkData> fEncoded;
24 const SkString fName;
25 int fSubsets;
26};
27
28} // namespace DM
29
30#endif // DMImageTask_DEFINED