199589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org#ifndef DMExpectationsTask_DEFINED
299589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org#define DMExpectationsTask_DEFINED
3d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
499589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org#include "DMExpectations.h"
5d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com#include "DMTask.h"
6d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com#include "SkBitmap.h"
7d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com#include "SkString.h"
8d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
9d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.comnamespace DM {
10d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
1199589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org// ExpectationsTask compares an SkBitmap against some Expectations.
12ee21a3e395298021ca70e0d72bf2d983b2fc9225mtklein@google.com// Moving this off the GPU threadpool is a nice (~30%) runtime win.
13ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgclass ExpectationsTask : public CpuTask {
14d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.compublic:
1599589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org    ExpectationsTask(const Task& parent, const Expectations&, SkBitmap);
16d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
17d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com    virtual void draw() SK_OVERRIDE;
18d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com    virtual bool shouldSkip() const SK_OVERRIDE { return false; }
19d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com    virtual SkString name() const SK_OVERRIDE { return fName; }
20d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
21d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.comprivate:
22d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com    const SkString fName;
2399589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org    const Expectations& fExpectations;
24d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com    const SkBitmap fBitmap;
25d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com};
26d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
27d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com}  // namespace DM
28d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
2999589af4e333422639d7e873207dd323fdd6e808commit-bot@chromium.org#endif  // DMExpectationsTask_DEFINED
30