| 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 | |
| commit-bot@chromium.org | 66bb3d1 | 2013-10-16 19:13:38 +0000 | [diff] [blame^] | 13 | // Records a GM through an SkPicture, draws it, and compares against the reference bitmap. |
| mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 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*, |
| commit-bot@chromium.org | 66bb3d1 | 2013-10-16 19:13:38 +0000 | [diff] [blame^] | 23 | SkBitmap reference); |
| mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 24 | |
| 25 | virtual void draw() SK_OVERRIDE; |
| 26 | virtual bool usesGpu() const SK_OVERRIDE { return false; } |
| 27 | virtual bool shouldSkip() const SK_OVERRIDE; |
| 28 | virtual SkString name() const SK_OVERRIDE { return fName; } |
| 29 | |
| 30 | private: |
| 31 | const SkString fName; |
| 32 | SkAutoTDelete<skiagm::GM> fGM; |
| commit-bot@chromium.org | 66bb3d1 | 2013-10-16 19:13:38 +0000 | [diff] [blame^] | 33 | const SkBitmap fReference; |
| mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace DM |
| 37 | |
| 38 | #endif // DMReplayTask_DEFINED |