commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 1 | #ifndef DMExpectationsTask_DEFINED |
| 2 | #define DMExpectationsTask_DEFINED |
| 3 | |
| 4 | #include "DMExpectations.h" |
| 5 | #include "DMTask.h" |
| 6 | #include "SkBitmap.h" |
| 7 | #include "SkString.h" |
| 8 | |
| 9 | namespace DM { |
| 10 | |
| 11 | // ExpectationsTask compares an SkBitmap against some Expectations. |
| 12 | // Moving this off the GPU threadpool is a nice (~30%) runtime win. |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 13 | class ExpectationsTask : public CpuTask { |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 14 | public: |
| 15 | ExpectationsTask(const Task& parent, const Expectations&, SkBitmap); |
| 16 | |
| 17 | virtual void draw() SK_OVERRIDE; |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 18 | virtual bool shouldSkip() const SK_OVERRIDE { return false; } |
| 19 | virtual SkString name() const SK_OVERRIDE { return fName; } |
| 20 | |
| 21 | private: |
| 22 | const SkString fName; |
| 23 | const Expectations& fExpectations; |
| 24 | const SkBitmap fBitmap; |
| 25 | }; |
| 26 | |
| 27 | } // namespace DM |
| 28 | |
| 29 | #endif // DMExpectationsTask_DEFINED |