OLD | NEW |
1 #include "DMGpuGMTask.h" | 1 #include "DMGpuGMTask.h" |
2 | 2 |
3 #include "DMUtil.h" | 3 #include "DMUtil.h" |
4 #include "DMWriteTask.h" | 4 #include "DMWriteTask.h" |
5 #include "SkCommandLineFlags.h" | 5 #include "SkCommandLineFlags.h" |
6 #include "SkSurface.h" | 6 #include "SkSurface.h" |
7 #include "SkTLS.h" | 7 #include "SkTLS.h" |
8 | 8 |
9 namespace DM { | 9 namespace DM { |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 SkCanvas* canvas = surface->getCanvas(); | 37 SkCanvas* canvas = surface->getCanvas(); |
38 | 38 |
39 canvas->concat(fGM->getInitialTransform()); | 39 canvas->concat(fGM->getInitialTransform()); |
40 fGM->draw(canvas); | 40 fGM->draw(canvas); |
41 canvas->flush(); | 41 canvas->flush(); |
42 | 42 |
43 SkBitmap bitmap; | 43 SkBitmap bitmap; |
44 bitmap.setInfo(info); | 44 bitmap.setInfo(info); |
45 canvas->readPixels(&bitmap, 0, 0); | 45 canvas->readPixels(&bitmap, 0, 0); |
46 | 46 |
47 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); | 47 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "GM", bitmap))); |
48 } | 48 } |
49 | 49 |
50 bool GpuGMTask::shouldSkip() const { | 50 bool GpuGMTask::shouldSkip() const { |
51 return kGPUDisabled || SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag)
; | 51 return kGPUDisabled || SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag)
; |
52 } | 52 } |
53 | 53 |
54 } // namespace DM | 54 } // namespace DM |
OLD | NEW |