blob: 23f3a45b0cff67de5045d32e0d236059b8c30dc8 [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,
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000025 int sampleCount);
26
27 virtual void draw(GrContextFactory*) SK_OVERRIDE;
28 virtual bool shouldSkip() const SK_OVERRIDE;
29 virtual SkString name() const SK_OVERRIDE { return fName; }
30
31private:
32 SkAutoTDelete<skiagm::GM> fGM;
33 const SkString fName;
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000034 const GrContextFactory::GLContextType fContextType;
kkinnunen80549fc2014-06-30 06:36:31 -070035 GrGLStandard fGpuAPI;
commit-bot@chromium.orgef57b7e2014-02-28 20:31:31 +000036 const int fSampleCount;
37};
38
39} // namespace DM
40
41#endif // DMGpuGMTask_DEFINED