2014-02-28 20:31:31 +00:00
|
|
|
#ifndef DMGpuGMTask_DEFINED
|
|
|
|
#define DMGpuGMTask_DEFINED
|
2013-10-16 13:02:15 +00:00
|
|
|
|
2014-03-26 21:26:15 +00:00
|
|
|
#include "DMGpuSupport.h"
|
2013-10-16 13:02:15 +00:00
|
|
|
#include "DMReporter.h"
|
|
|
|
#include "DMTask.h"
|
|
|
|
#include "DMTaskRunner.h"
|
|
|
|
#include "SkBitmap.h"
|
|
|
|
#include "SkString.h"
|
|
|
|
#include "SkTemplates.h"
|
|
|
|
#include "gm.h"
|
|
|
|
|
|
|
|
// This is the main entry point for drawing GMs with the GPU.
|
|
|
|
|
|
|
|
namespace DM {
|
|
|
|
|
2014-02-28 20:31:31 +00:00
|
|
|
class GpuGMTask : public GpuTask {
|
2013-10-16 13:02:15 +00:00
|
|
|
public:
|
2014-02-28 20:31:31 +00:00
|
|
|
GpuGMTask(const char* config,
|
|
|
|
Reporter*,
|
|
|
|
TaskRunner*,
|
|
|
|
skiagm::GMRegistry::Factory,
|
|
|
|
GrContextFactory::GLContextType,
|
2014-06-30 13:36:31 +00:00
|
|
|
GrGLStandard gpuAPI,
|
2014-11-07 15:12:46 +00:00
|
|
|
int sampleCount,
|
|
|
|
bool useDFText);
|
2014-02-28 20:31:31 +00:00
|
|
|
|
|
|
|
virtual void draw(GrContextFactory*) SK_OVERRIDE;
|
2013-10-16 13:02:15 +00:00
|
|
|
virtual bool shouldSkip() const SK_OVERRIDE;
|
|
|
|
virtual SkString name() const SK_OVERRIDE { return fName; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
SkAutoTDelete<skiagm::GM> fGM;
|
|
|
|
const SkString fName;
|
|
|
|
const GrContextFactory::GLContextType fContextType;
|
2014-06-30 13:36:31 +00:00
|
|
|
GrGLStandard fGpuAPI;
|
2013-10-16 13:02:15 +00:00
|
|
|
const int fSampleCount;
|
2014-11-07 15:12:46 +00:00
|
|
|
const bool fUseDFText;
|
2013-10-16 13:02:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace DM
|
|
|
|
|
2014-02-28 20:31:31 +00:00
|
|
|
#endif // DMGpuGMTask_DEFINED
|