skia2/dm/DMGpuGMTask.h
mtklein e4d3e605f7 DM: SKP source / PDF backend
Removed expectations code for PDF backend for now, given that we don't have any, and refactored a little to make that cleaner.

We can now test .skp -> .pdf -> .png in DM.  Neat eh?

BUG=skia:2598
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/316643003
2014-06-06 09:28:43 -07:00

43 lines
1.0 KiB
C++

#ifndef DMGpuGMTask_DEFINED
#define DMGpuGMTask_DEFINED
#include "DMExpectations.h"
#include "DMGpuSupport.h"
#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 {
class GpuGMTask : public GpuTask {
public:
GpuGMTask(const char* config,
Reporter*,
TaskRunner*,
skiagm::GMRegistry::Factory,
const Expectations&,
GrContextFactory::GLContextType,
int sampleCount);
virtual void draw(GrContextFactory*) SK_OVERRIDE;
virtual bool shouldSkip() const SK_OVERRIDE;
virtual SkString name() const SK_OVERRIDE { return fName; }
private:
SkAutoTDelete<skiagm::GM> fGM;
const SkString fName;
const Expectations& fExpectations;
const GrContextFactory::GLContextType fContextType;
const int fSampleCount;
};
} // namespace DM
#endif // DMGpuGMTask_DEFINED