OLD | NEW |
1 #include "DMGpuGMTask.h" | 1 #include "DMGpuGMTask.h" |
2 | 2 |
3 #include "DMExpectationsTask.h" | 3 #include "DMExpectationsTask.h" |
4 #include "DMUtil.h" | 4 #include "DMUtil.h" |
5 #include "DMWriteTask.h" | 5 #include "DMWriteTask.h" |
6 #include "SkCommandLineFlags.h" | 6 #include "SkCommandLineFlags.h" |
7 #include "SkSurface.h" | 7 #include "SkSurface.h" |
8 #include "SkTLS.h" | 8 #include "SkTLS.h" |
9 | 9 |
10 namespace DM { | 10 namespace DM { |
(...skipping 19 matching lines...) Expand all Loading... |
30 kN32_SkColorType, | 30 kN32_SkColorType, |
31 kPremul_SkAlphaType); | 31 kPremul_SkAlphaType); |
32 SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info,
fSampleCount)); | 32 SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info,
fSampleCount)); |
33 SkCanvas* canvas = surface->getCanvas(); | 33 SkCanvas* canvas = surface->getCanvas(); |
34 | 34 |
35 canvas->concat(fGM->getInitialTransform()); | 35 canvas->concat(fGM->getInitialTransform()); |
36 fGM->draw(canvas); | 36 fGM->draw(canvas); |
37 canvas->flush(); | 37 canvas->flush(); |
38 | 38 |
39 SkBitmap bitmap; | 39 SkBitmap bitmap; |
40 bitmap.setConfig(info); | 40 bitmap.setInfo(info); |
41 canvas->readPixels(&bitmap, 0, 0); | 41 canvas->readPixels(&bitmap, 0, 0); |
42 | 42 |
43 this->spawnChild(SkNEW_ARGS(ExpectationsTask, (*this, fExpectations, bitmap)
)); | 43 this->spawnChild(SkNEW_ARGS(ExpectationsTask, (*this, fExpectations, bitmap)
)); |
44 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); | 44 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); |
45 } | 45 } |
46 | 46 |
47 bool GpuGMTask::shouldSkip() const { | 47 bool GpuGMTask::shouldSkip() const { |
48 return kGPUDisabled || SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag)
; | 48 return kGPUDisabled || SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag)
; |
49 } | 49 } |
50 | 50 |
51 } // namespace DM | 51 } // namespace DM |
OLD | NEW |