blob: 301cfd38647f475a3528907dedc2f1d575a3260b [file] [log] [blame]
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +00001#ifndef DMCpuGMTask_DEFINED
2#define DMCpuGMTask_DEFINED
mtklein@google.comd36522d2013-10-16 13:02:15 +00003
4#include "DMReporter.h"
5#include "DMTask.h"
6#include "DMTaskRunner.h"
7#include "SkBitmap.h"
8#include "SkString.h"
9#include "SkTemplates.h"
10#include "gm.h"
mtklein@google.comd36522d2013-10-16 13:02:15 +000011
12// This is the main entry point for drawing GMs with the CPU. Commandline
13// flags control whether this kicks off various comparison tasks when done.
mtklein@google.comd36522d2013-10-16 13:02:15 +000014
15namespace DM {
16
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000017class CpuGMTask : public CpuTask {
mtklein@google.comd36522d2013-10-16 13:02:15 +000018public:
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000019 CpuGMTask(const char* config,
20 Reporter*,
21 TaskRunner*,
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000022 skiagm::GMRegistry::Factory,
23 SkColorType);
mtklein@google.comd36522d2013-10-16 13:02:15 +000024
25 virtual void draw() SK_OVERRIDE;
mtklein@google.comd36522d2013-10-16 13:02:15 +000026 virtual bool shouldSkip() const SK_OVERRIDE;
27 virtual SkString name() const SK_OVERRIDE { return fName; }
28
29private:
30 skiagm::GMRegistry::Factory fGMFactory;
31 SkAutoTDelete<skiagm::GM> fGM;
32 const SkString fName;
commit-bot@chromium.org15a14052014-02-16 00:59:25 +000033 const SkColorType fColorType;
mtklein@google.comd36522d2013-10-16 13:02:15 +000034};
35
36} // namespace DM
37
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000038#endif // DMCpuGMTask_DEFINED