Create fragment processor for performing input color blend with child processor

The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.

Review URL: https://codereview.chromium.org/1334293003
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index 0b8f936..a438c5b 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -194,15 +194,15 @@
      */
     static bool IsOpaque(const SkXfermode* xfer, SrcColorOpacity opacityType);
 
-    /** Implemented by a subclass to support use as an image filter in the GPU backend. When used as
-        an image filter the xfer mode blends the source color against a background texture rather
-        than the destination. It is implemented as a fragment processor. This can be called with
-        both params set to NULL to query whether it would succeed. Otherwise, both params are
-        required. Upon success the function returns true and the caller owns a ref to the fragment
-        parameter. Upon failure false is returned and the processor param is not written to.
+    /** Used to do in-shader blending between two colors computed in the shader via a
+        GrFragmentProcessor. The input to the returned FP is the src color. The dst color is
+        provided by the dst param which becomes a child FP of the returned FP. If the params are
+        null then this is just a query of whether the SkXfermode could support this functionality.
+        It is legal for the function to succeed but return a null output. This indicates that
+        the output of the blend is simply the src color.
      */
-    virtual bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*,
-                                     GrTexture* background) const;
+    virtual bool asFragmentProcessor(const GrFragmentProcessor** output, GrProcessorDataManager*,
+                                     const GrFragmentProcessor* dst) const;
 
     /** A subclass may implement this factory function to work with the GPU backend. It is legal
         to call this with xpf NULL to simply test the return value. If xpf is non-NULL then the
@@ -226,7 +226,7 @@
     SkXfermode() {}
     /** The default implementation of xfer32/xfer16/xferA8 in turn call this
         method, 1 color at a time (upscaled to a SkPMColor). The default
-        implmentation of this method just returns dst. If performance is
+        implementation of this method just returns dst. If performance is
         important, your subclass should override xfer32/xfer16/xferA8 directly.
 
         This method will not be called directly by the client, so it need not