OLD | NEW |
1 #include "DMCpuTask.h" | 1 #include "DMCpuTask.h" |
2 #include "DMReplayTask.h" | 2 #include "DMReplayTask.h" |
3 #include "DMUtil.h" | 3 #include "DMUtil.h" |
| 4 #include "DMWriteTask.h" |
4 #include "SkCommandLineFlags.h" | 5 #include "SkCommandLineFlags.h" |
5 | 6 |
6 DEFINE_bool(replay, false, "If true, run replay tests for each CpuTask."); | 7 DEFINE_bool(replay, false, "If true, run replay tests for each CpuTask."); |
7 // TODO(mtklein): add the other various options | 8 // TODO(mtklein): add the other various options |
8 | 9 |
9 namespace DM { | 10 namespace DM { |
10 | 11 |
11 CpuTask::CpuTask(const char* name, | 12 CpuTask::CpuTask(const char* name, |
12 Reporter* reporter, | 13 Reporter* reporter, |
13 TaskRunner* taskRunner, | 14 TaskRunner* taskRunner, |
(...skipping 20 matching lines...) Expand all Loading... |
34 canvas.flush(); | 35 canvas.flush(); |
35 | 36 |
36 if (!meetsExpectations(fExpectations, bitmap)) { | 37 if (!meetsExpectations(fExpectations, bitmap)) { |
37 this->fail(); | 38 this->fail(); |
38 } | 39 } |
39 | 40 |
40 if (FLAGS_replay) { | 41 if (FLAGS_replay) { |
41 this->spawnChild(SkNEW_ARGS(ReplayTask, | 42 this->spawnChild(SkNEW_ARGS(ReplayTask, |
42 ("replay", *this, fGMFactory(NULL), bitmap)))
; | 43 ("replay", *this, fGMFactory(NULL), bitmap)))
; |
43 } | 44 } |
| 45 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); |
44 } | 46 } |
45 | 47 |
46 bool CpuTask::shouldSkip() const { | 48 bool CpuTask::shouldSkip() const { |
47 if (SkBitmap::kRGB_565_Config == fConfig && (fGM->getFlags() & skiagm::GM::k
Skip565_Flag)) { | 49 if (SkBitmap::kRGB_565_Config == fConfig && (fGM->getFlags() & skiagm::GM::k
Skip565_Flag)) { |
48 return true; | 50 return true; |
49 } | 51 } |
50 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) { | 52 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) { |
51 return true; | 53 return true; |
52 } | 54 } |
53 return false; | 55 return false; |
54 } | 56 } |
55 | 57 |
56 } // namespace DM | 58 } // namespace DM |
OLD | NEW |