OLD | NEW |
1 #include "DMPipeTask.h" | 1 #include "DMPipeTask.h" |
2 #include "DMUtil.h" | 2 #include "DMUtil.h" |
3 #include "DMWriteTask.h" | 3 #include "DMWriteTask.h" |
4 | 4 |
5 #include "SamplePipeControllers.h" | 5 #include "SamplePipeControllers.h" |
6 #include "SkCommandLineFlags.h" | 6 #include "SkCommandLineFlags.h" |
7 #include "SkGPipe.h" | 7 #include "SkGPipe.h" |
8 | 8 |
9 DEFINE_bool(pipe, true, "If true, check several pipe variants against the refere
nce bitmap."); | 9 DEFINE_bool(pipe, true, "If true, check several pipe variants against the refere
nce bitmap."); |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 SkCanvas* pipeCanvas = writer.startRecording(&pipeController, | 54 SkCanvas* pipeCanvas = writer.startRecording(&pipeController, |
55 fFlags, | 55 fFlags, |
56 bitmap.width(), | 56 bitmap.width(), |
57 bitmap.height()); | 57 bitmap.height()); |
58 pipeCanvas->concat(fGM->getInitialTransform()); | 58 pipeCanvas->concat(fGM->getInitialTransform()); |
59 fGM->draw(pipeCanvas); | 59 fGM->draw(pipeCanvas); |
60 writer.endRecording(); | 60 writer.endRecording(); |
61 | 61 |
62 if (!BitmapsEqual(bitmap, fReference)) { | 62 if (!BitmapsEqual(bitmap, fReference)) { |
63 this->fail(); | 63 this->fail(); |
64 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); | 64 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "GM", bitmap))); |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
68 bool PipeTask::shouldSkip() const { | 68 bool PipeTask::shouldSkip() const { |
69 if (!FLAGS_pipe) { | 69 if (!FLAGS_pipe) { |
70 return true; | 70 return true; |
71 } | 71 } |
72 if (fGM->getFlags() & skiagm::GM::kSkipPipe_Flag) { | 72 if (fGM->getFlags() & skiagm::GM::kSkipPipe_Flag) { |
73 return true; | 73 return true; |
74 } | 74 } |
75 if (fFlags == SkGPipeWriter::kCrossProcess_Flag && | 75 if (fFlags == SkGPipeWriter::kCrossProcess_Flag && |
76 fGM->getFlags() & skiagm::GM::kSkipPipeCrossProcess_Flag) { | 76 fGM->getFlags() & skiagm::GM::kSkipPipeCrossProcess_Flag) { |
77 return true; | 77 return true; |
78 } | 78 } |
79 return false; | 79 return false; |
80 } | 80 } |
81 | 81 |
82 } // namespace DM | 82 } // namespace DM |
OLD | NEW |