| mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | #ifndef DMComparisonTask_DEFINED |
| 2 | #define DMComparisonTask_DEFINED |
| 3 | |
| 4 | #include "DMTask.h" |
| 5 | #include "SkBitmap.h" |
| 6 | #include "SkString.h" |
| 7 | #include "gm_expectations.h" |
| 8 | |
| 9 | namespace DM { |
| 10 | |
| 11 | // We use ComparisonTask to move CPU-bound comparison work of GpuTasks back to |
| 12 | // the main thread pool, where we probably have more threads available. |
| 13 | |
| 14 | class ComparisonTask : public Task { |
| 15 | public: |
| 16 | ComparisonTask(const Task& parent, skiagm::Expectations, SkBitmap); |
| 17 | |
| 18 | virtual void draw() SK_OVERRIDE; |
| 19 | virtual bool usesGpu() const SK_OVERRIDE { return false; } |
| 20 | virtual bool shouldSkip() const SK_OVERRIDE { return false; } |
| 21 | virtual SkString name() const SK_OVERRIDE { return fName; } |
| 22 | |
| 23 | private: |
| 24 | const SkString fName; |
| 25 | const skiagm::Expectations fExpectations; |
| 26 | const SkBitmap fBitmap; |
| 27 | }; |
| 28 | |
| 29 | } // namespace DM |
| 30 | |
| 31 | #endif // DMComparisonTask_DEFINED |