| OLD | NEW |
| 1 #ifndef DMQuiltTask_DEFINED | 1 #ifndef DMQuiltTask_DEFINED |
| 2 #define DMQuiltTask_DEFINED | 2 #define DMQuiltTask_DEFINED |
| 3 | 3 |
| 4 #include "DMTask.h" | 4 #include "DMTask.h" |
| 5 #include "SkBitmap.h" | 5 #include "SkBitmap.h" |
| 6 #include "SkString.h" | 6 #include "SkString.h" |
| 7 #include "SkTemplates.h" | 7 #include "SkTemplates.h" |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 // Records a GM through an SkPicture, draws it in tiles, and compares against th
e reference bitmap. | 10 // Records a GM through an SkPicture, draws it in tiles, and compares against th
e reference bitmap. |
| 11 | 11 |
| 12 namespace DM { | 12 namespace DM { |
| 13 | 13 |
| 14 class QuiltTask : public CpuTask { | 14 class QuiltTask : public CpuTask { |
| 15 | |
| 16 public: | 15 public: |
| 17 enum Mode { | 16 enum BBH { |
| 18 kNoBBH_Mode, | 17 kNone_BBH, |
| 19 kRTree_Mode, | 18 kRTree_BBH, |
| 20 kQuadTree_Mode, | 19 kQuadTree_BBH, |
| 21 kTileGrid_Mode, | 20 kTileGrid_BBH, |
| 22 kSkRecord_Mode, // Currently uses no BBH. | 21 }; |
| 22 enum Backend { |
| 23 kDefault_Backend, |
| 24 kSkRecord_Backend, |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 QuiltTask(const Task& parent, // QuiltTask must be a child task. Pass its
parent here. | 27 QuiltTask(const Task& parent, // QuiltTask must be a child task. Pass its
parent here. |
| 26 skiagm::GM*, // GM to run through a picture. Takes owners
hip. | 28 skiagm::GM*, // GM to run through a picture. Takes owners
hip. |
| 27 SkBitmap reference, // Bitmap to compare picture replay results t
o. | 29 SkBitmap reference, // Bitmap to compare picture replay results t
o. |
| 28 Mode mode); | 30 BBH, Backend); |
| 29 | 31 |
| 30 virtual void draw() SK_OVERRIDE; | 32 virtual void draw() SK_OVERRIDE; |
| 31 virtual bool shouldSkip() const SK_OVERRIDE; | 33 virtual bool shouldSkip() const SK_OVERRIDE; |
| 32 virtual SkString name() const SK_OVERRIDE { return fName; } | 34 virtual SkString name() const SK_OVERRIDE { return fName; } |
| 33 | 35 |
| 34 private: | 36 private: |
| 35 const Mode fMode; | 37 const BBH fBBH; |
| 38 const Backend fBackend; |
| 36 const SkString fName; | 39 const SkString fName; |
| 37 SkAutoTDelete<skiagm::GM> fGM; | 40 SkAutoTDelete<skiagm::GM> fGM; |
| 38 const SkBitmap fReference; | 41 const SkBitmap fReference; |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 } // namespace DM | 44 } // namespace DM |
| 42 | 45 |
| 43 #endif // DMReplayTask_DEFINED | 46 #endif // DMReplayTask_DEFINED |
| OLD | NEW |