Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: dm/DMChecksumTask.h

Issue 88543002: DM: some refactoring (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dm/DMChecksumTask.cpp » ('j') | dm/DMChecksumTask.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « no previous file | dm/DMChecksumTask.cpp » ('j') | dm/DMChecksumTask.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698