#include "GrDitherEffect.h"
#include "gl/GrGLEffect.h"
+#include "gl/GrGLShaderBuilder.h"
#include "gl/GrGLSL.h"
#include "GrTBackendEffectFactory.h"
class DitherEffect : public GrEffect {
public:
- static GrEffectRef* Create() {
- return CreateEffectRef(AutoEffectUnref(SkNEW(DitherEffect)));
+ static GrEffect* Create() {
+ GR_CREATE_STATIC_EFFECT(gDitherEffect, DitherEffect, ())
+ return SkRef(gDitherEffect);
}
virtual ~DitherEffect() {};
GR_DEFINE_EFFECT_TEST(DitherEffect);
-GrEffectRef* DitherEffect::TestCreate(SkRandom*,
- GrContext*,
- const GrDrawTargetCaps&,
- GrTexture*[]) {
+GrEffect* DitherEffect::TestCreate(SkRandom*,
+ GrContext*,
+ const GrDrawTargetCaps&,
+ GrTexture*[]) {
return DitherEffect::Create();
}
virtual void emitCode(GrGLShaderBuilder* builder,
const GrDrawEffect& drawEffect,
- EffectKey key,
+ const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray&,
void GLDitherEffect::emitCode(GrGLShaderBuilder* builder,
const GrDrawEffect& drawEffect,
- EffectKey key,
+ const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray&,
//////////////////////////////////////////////////////////////////////////////
-GrEffectRef* GrDitherEffect::Create() {
- return DitherEffect::Create();
-}
+GrEffect* GrDitherEffect::Create() { return DitherEffect::Create(); }