blob: 553436d040c3ec5527e20e8a48354ddacbd0a48d [file] [log] [blame]
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +00001#ifndef DMGpuGMTask_DEFINED
2#define DMGpuGMTask_DEFINED
3
commit-bot@chromium.org787227d2014-03-26 21:26:15 +00004#include "DMGpuSupport.h"
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +00005#include "DMReporter.h"
6#include "DMTask.h"
7#include "DMTaskRunner.h"
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +00008#include "SkBitmap.h"
9#include "SkString.h"
10#include "SkTemplates.h"
11#include "gm.h"
12
13// This is the main entry point for drawing GMs with the GPU.
14
15namespace DM {
16
17class GpuGMTask : public GpuTask {
18public:
19 GpuGMTask(const char* config,
20 Reporter*,
21 TaskRunner*,
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000022 skiagm::GMRegistry::Factory,
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000023 GrContextFactory::GLContextType,
kkinnunen80549fc2014-06-30 06:36:31 -070024 GrGLStandard gpuAPI,
jvanverth4736e142014-11-07 07:12:46 -080025 int sampleCount,
26 bool useDFText);
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000027
28 virtual void draw(GrContextFactory*) SK_OVERRIDE;
29 virtual bool shouldSkip() const SK_OVERRIDE;
30 virtual SkString name() const SK_OVERRIDE { return fName; }
31
32private:
33 SkAutoTDelete<skiagm::GM> fGM;
34 const SkString fName;
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000035 const GrContextFactory::GLContextType fContextType;
kkinnunen80549fc2014-06-30 06:36:31 -070036 GrGLStandard fGpuAPI;
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000037 const int fSampleCount;
jvanverth4736e142014-11-07 07:12:46 -080038 const bool fUseDFText;
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000039};
40
41} // namespace DM
42
43#endif // DMGpuGMTask_DEFINED