OLD | NEW |
1 #include "DMQuiltTask.h" | 1 #include "DMQuiltTask.h" |
2 #include "DMUtil.h" | 2 #include "DMUtil.h" |
3 #include "DMWriteTask.h" | 3 #include "DMWriteTask.h" |
4 | 4 |
5 #include "SkBBHFactory.h" | 5 #include "SkBBHFactory.h" |
6 #include "SkCommandLineFlags.h" | 6 #include "SkCommandLineFlags.h" |
7 #include "SkPicture.h" | 7 #include "SkPicture.h" |
8 #include "SkTaskGroup.h" | 8 #include "SkTaskGroup.h" |
9 | 9 |
10 DEFINE_bool(quilt, true, "If true, draw GM via a picture into a quilt of small t
iles and compare."); | 10 DEFINE_bool(quilt, true, "If true, draw GM via a picture into a quilt of small t
iles and compare."); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 for (int y = 0; y < tiles_needed(full.height(), FLAGS_quiltTile); y++) { | 100 for (int y = 0; y < tiles_needed(full.height(), FLAGS_quiltTile); y++) { |
101 for (int x = 0; x < tiles_needed(full.width(), FLAGS_quiltTile); x++
) { | 101 for (int x = 0; x < tiles_needed(full.width(), FLAGS_quiltTile); x++
) { |
102 // Deletes itself when done. | 102 // Deletes itself when done. |
103 tg.add(new Tile(x, y, *recorded, &full)); | 103 tg.add(new Tile(x, y, *recorded, &full)); |
104 } | 104 } |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
108 if (!BitmapsEqual(full, fReference)) { | 108 if (!BitmapsEqual(full, fReference)) { |
109 this->fail(); | 109 this->fail(); |
110 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, full))); | 110 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "GM", full))); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 bool QuiltTask::shouldSkip() const { | 114 bool QuiltTask::shouldSkip() const { |
115 if (fGM->getFlags() & skiagm::GM::kSkipPicture_Flag) { | 115 if (fGM->getFlags() & skiagm::GM::kSkipPicture_Flag) { |
116 return true; | 116 return true; |
117 } | 117 } |
118 return !FLAGS_quilt; | 118 return !FLAGS_quilt; |
119 } | 119 } |
120 | 120 |
121 } // namespace DM | 121 } // namespace DM |
OLD | NEW |