Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #ifndef DMComparisonTask_DEFINED | 1 #ifndef DMChecksumTask_DEFINED |
| 2 #define DMComparisonTask_DEFINED | 2 #define DMChecksumTask_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 "gm_expectations.h" | 7 #include "gm_expectations.h" |
| 8 | 8 |
| 9 namespace DM { | 9 namespace DM { |
| 10 | 10 |
| 11 // We use ComparisonTask to move CPU-bound comparison work of GpuTasks back to | 11 // ChecksumTask compares an SkBitmap against some Expectations. |
| 12 // the main thread pool, where we probably have more threads available. | 12 // Moving this off the GPU threadpool is a nice (~30%) runtime win. |
| 13 | 13 class ChecksumTask : public Task { |
|
epoger
2013/11/26 17:55:22
Not a big deal either way, but IMO "ComparisonTask
mtklein
2013/11/26 18:25:30
Yeah, wanted something to make it distinct from th
| |
| 14 class ComparisonTask : public Task { | |
| 15 public: | 14 public: |
| 16 ComparisonTask(const Task& parent, skiagm::Expectations, SkBitmap); | 15 ChecksumTask(const Task& parent, skiagm::Expectations, SkBitmap); |
| 17 | 16 |
| 18 virtual void draw() SK_OVERRIDE; | 17 virtual void draw() SK_OVERRIDE; |
| 19 virtual bool usesGpu() const SK_OVERRIDE { return false; } | 18 virtual bool usesGpu() const SK_OVERRIDE { return false; } |
| 20 virtual bool shouldSkip() const SK_OVERRIDE { return false; } | 19 virtual bool shouldSkip() const SK_OVERRIDE { return false; } |
| 21 virtual SkString name() const SK_OVERRIDE { return fName; } | 20 virtual SkString name() const SK_OVERRIDE { return fName; } |
| 22 | 21 |
| 23 private: | 22 private: |
| 24 const SkString fName; | 23 const SkString fName; |
| 25 const skiagm::Expectations fExpectations; | 24 const skiagm::Expectations fExpectations; |
| 26 const SkBitmap fBitmap; | 25 const SkBitmap fBitmap; |
| 27 }; | 26 }; |
| 28 | 27 |
| 29 } // namespace DM | 28 } // namespace DM |
| 30 | 29 |
| 31 #endif // DMComparisonTask_DEFINED | 30 #endif // DMChecksumTask_DEFINED |
| OLD | NEW |