Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / effects / GrConvolutionEffect.h
index 56a54b4..f2a2d5a 100644 (file)
@@ -22,35 +22,33 @@ class GrConvolutionEffect : public Gr1DKernelEffect {
 public:
 
     /// Convolve with an arbitrary user-specified kernel
-    static GrEffectRef* Create(GrTexture* tex,
-                               Direction dir,
-                               int halfWidth,
-                               const float* kernel,
-                               bool useBounds,
-                               float bounds[2]) {
-        AutoEffectUnref effect(SkNEW_ARGS(GrConvolutionEffect, (tex,
-                                                                dir,
-                                                                halfWidth,
-                                                                kernel,
-                                                                useBounds,
-                                                                bounds)));
-        return CreateEffectRef(effect);
-    }
-
-    /// Convolve with a Gaussian kernel
-    static GrEffectRef* CreateGaussian(GrTexture* tex,
+    static GrFragmentProcessor* Create(GrTexture* tex,
                                        Direction dir,
                                        int halfWidth,
-                                       float gaussianSigma,
+                                       const float* kernel,
                                        bool useBounds,
                                        float bounds[2]) {
-        AutoEffectUnref effect(SkNEW_ARGS(GrConvolutionEffect, (tex,
-                                                                dir,
-                                                                halfWidth,
-                                                                gaussianSigma,
-                                                                useBounds,
-                                                                bounds)));
-        return CreateEffectRef(effect);
+        return SkNEW_ARGS(GrConvolutionEffect, (tex,
+                                                dir,
+                                                halfWidth,
+                                                kernel,
+                                                useBounds,
+                                                bounds));
+    }
+
+    /// Convolve with a Gaussian kernel
+    static GrFragmentProcessor* CreateGaussian(GrTexture* tex,
+                                               Direction dir,
+                                               int halfWidth,
+                                               float gaussianSigma,
+                                               bool useBounds,
+                                               float bounds[2]) {
+        return SkNEW_ARGS(GrConvolutionEffect, (tex,
+                                                dir,
+                                                halfWidth,
+                                                gaussianSigma,
+                                                useBounds,
+                                                bounds));
     }
 
     virtual ~GrConvolutionEffect();
@@ -62,9 +60,9 @@ public:
 
     static const char* Name() { return "Convolution"; }
 
-    typedef GrGLConvolutionEffect GLEffect;
+    typedef GrGLConvolutionEffect GLProcessor;
 
-    virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
+    virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
 
     virtual void getConstantColorComponents(GrColor*, uint32_t* validFlags) const {
         // If the texture was opaque we could know that the output color if we knew the sum of the
@@ -103,9 +101,9 @@ private:
                         bool useBounds,
                         float bounds[2]);
 
-    virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE;
+    virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
 
-    GR_DECLARE_EFFECT_TEST;
+    GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
 
     typedef Gr1DKernelEffect INHERITED;
 };