| OLD | NEW |
| 1 #include "DMCpuTask.h" | 1 #include "DMCpuTask.h" |
| 2 #include "DMExpectationsTask.h" | 2 #include "DMExpectationsTask.h" |
| 3 #include "DMPipeTask.h" | 3 #include "DMPipeTask.h" |
| 4 #include "DMReplayTask.h" | 4 #include "DMReplayTask.h" |
| 5 #include "DMSerializeTask.h" | 5 #include "DMSerializeTask.h" |
| 6 #include "DMTileGridTask.h" | 6 #include "DMTileGridTask.h" |
| 7 #include "DMUtil.h" | 7 #include "DMUtil.h" |
| 8 #include "DMWriteTask.h" | 8 #include "DMWriteTask.h" |
| 9 | 9 |
| 10 namespace DM { | 10 namespace DM { |
| 11 | 11 |
| 12 CpuTask::CpuTask(const char* name, | 12 CpuTask::CpuTask(const char* config, |
| 13 Reporter* reporter, | 13 Reporter* reporter, |
| 14 TaskRunner* taskRunner, | 14 TaskRunner* taskRunner, |
| 15 const Expectations& expectations, | 15 const Expectations& expectations, |
| 16 skiagm::GMRegistry::Factory gmFactory, | 16 skiagm::GMRegistry::Factory gmFactory, |
| 17 SkColorType colorType) | 17 SkColorType colorType) |
| 18 : Task(reporter, taskRunner) | 18 : Task(reporter, taskRunner) |
| 19 , fGMFactory(gmFactory) | 19 , fGMFactory(gmFactory) |
| 20 , fGM(fGMFactory(NULL)) | 20 , fGM(fGMFactory(NULL)) |
| 21 , fName(UnderJoin(fGM->shortName(), name)) | 21 , fName(UnderJoin(fGM->getName(), config)) |
| 22 , fExpectations(expectations) | 22 , fExpectations(expectations) |
| 23 , fColorType(colorType) | 23 , fColorType(colorType) |
| 24 {} | 24 {} |
| 25 | 25 |
| 26 void CpuTask::draw() { | 26 void CpuTask::draw() { |
| 27 SkBitmap bitmap; | 27 SkBitmap bitmap; |
| 28 SetupBitmap(fColorType, fGM.get(), &bitmap); | 28 SetupBitmap(fColorType, fGM.get(), &bitmap); |
| 29 | 29 |
| 30 SkCanvas canvas(bitmap); | 30 SkCanvas canvas(bitmap); |
| 31 canvas.concat(fGM->getInitialTransform()); | 31 canvas.concat(fGM->getInitialTransform()); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 51 if (kRGB_565_SkColorType == fColorType && (fGM->getFlags() & skiagm::GM::kSk
ip565_Flag)) { | 51 if (kRGB_565_SkColorType == fColorType && (fGM->getFlags() & skiagm::GM::kSk
ip565_Flag)) { |
| 52 return true; | 52 return true; |
| 53 } | 53 } |
| 54 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) { | 54 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) { |
| 55 return true; | 55 return true; |
| 56 } | 56 } |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace DM | 60 } // namespace DM |
| OLD | NEW |