OLD | NEW |
(Empty) | |
| 1 #include "DMRecordTask.h" |
| 2 #include "DMSKPTask.h" |
| 3 #include "DMUtil.h" |
| 4 #include "DMWriteTask.h" |
| 5 |
| 6 namespace DM { |
| 7 |
| 8 SKPTask::SKPTask(Reporter* r, TaskRunner* tr, SkPicture* pic, SkString name) |
| 9 : CpuTask(r, tr), fPicture(SkRef(pic)), fName(name) {} |
| 10 |
| 11 void SKPTask::draw() { |
| 12 SkBitmap bitmap; |
| 13 SetupBitmap(kN32_SkColorType, *fPicture, &bitmap); |
| 14 DrawPicture(fPicture, &bitmap); |
| 15 |
| 16 this->spawnChild(SkNEW_ARGS(RecordTask, |
| 17 (*this, fPicture, bitmap, RecordTask::kNoOptimiz
e_Mode))); |
| 18 this->spawnChild(SkNEW_ARGS(RecordTask, |
| 19 (*this, fPicture, bitmap, RecordTask::kOptimize_
Mode))); |
| 20 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap, WriteTask::kVerbatim_
Mode))); |
| 21 } |
| 22 |
| 23 } // namespace DM |
OLD | NEW |