mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame^] | 1 | #ifndef DMReplayTask_DEFINED |
| 2 | #define DMReplayTask_DEFINED |
| 3 | |
| 4 | #include "DMReporter.h" |
| 5 | #include "DMTask.h" |
| 6 | #include "DMTaskRunner.h" |
| 7 | #include "SkBitmap.h" |
| 8 | #include "SkString.h" |
| 9 | #include "SkTemplates.h" |
| 10 | #include "gm.h" |
| 11 | #include "gm_expectations.h" |
| 12 | |
| 13 | // Records a GM through an SkPicture, draws it, and compares against the reference checksum. |
| 14 | |
| 15 | namespace DM { |
| 16 | |
| 17 | class ReplayTask : public Task { |
| 18 | |
| 19 | public: |
| 20 | ReplayTask(const char* name, |
| 21 | const Task& parent, |
| 22 | skiagm::GM*, |
| 23 | skiagm::GmResultDigest reference, |
| 24 | SkBitmap::Config); |
| 25 | |
| 26 | virtual void draw() SK_OVERRIDE; |
| 27 | virtual bool usesGpu() const SK_OVERRIDE { return false; } |
| 28 | virtual bool shouldSkip() const SK_OVERRIDE; |
| 29 | virtual SkString name() const SK_OVERRIDE { return fName; } |
| 30 | |
| 31 | private: |
| 32 | const SkString fName; |
| 33 | SkAutoTDelete<skiagm::GM> fGM; |
| 34 | const skiagm::GmResultDigest fReference; |
| 35 | const SkBitmap::Config fConfig; |
| 36 | }; |
| 37 | |
| 38 | } // namespace DM |
| 39 | |
| 40 | #endif // DMReplayTask_DEFINED |