Implement morphology as a custom effect

Review URL: http://codereview.appspot.com/6250073/



git-svn-id: http://skia.googlecode.com/svn/trunk@4102 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index c9c15df..8768528 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -617,6 +617,14 @@
                              float sigmaX, float sigmaY);
 
     /**
+     * This enum is used with the function below, applyMorphology.
+     */
+    enum MorphologyType {
+        kErode_MorphologyType,
+        kDilate_MorphologyType,
+    };
+
+    /**
      * Applies a 2D morphology to a given texture.
      * @param srcTexture      The source texture to be blurred.
      * @param rect            The destination rectangle.
@@ -632,7 +640,7 @@
     GrTexture* applyMorphology(GrTexture* srcTexture,
                                const GrRect& rect,
                                GrTexture* temp1, GrTexture* temp2,
-                               GrSamplerState::Filter filter,
+                               MorphologyType type,
                                SkISize radius);
     
     ///////////////////////////////////////////////////////////////////////////