blob: cf76fc8bdf2b61b35958df854031577269383135 [file] [log] [blame]
commit-bot@chromium.org99589af2013-12-10 14:53:16 +00001#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
9namespace DM {
10
11// ExpectationsTask compares an SkBitmap against some Expectations.
12// Moving this off the GPU threadpool is a nice (~30%) runtime win.
13class ExpectationsTask : public Task {
14public:
15 ExpectationsTask(const Task& parent, const Expectations&, SkBitmap);
16
17 virtual void draw() SK_OVERRIDE;
18 virtual bool usesGpu() const SK_OVERRIDE { return false; }
19 virtual bool shouldSkip() const SK_OVERRIDE { return false; }
20 virtual SkString name() const SK_OVERRIDE { return fName; }
21
22private:
23 const SkString fName;
24 const Expectations& fExpectations;
25 const SkBitmap fBitmap;
26};
27
28} // namespace DM
29
30#endif // DMExpectationsTask_DEFINED