Split up SkXfermode::asNewEffectOrCoeff() into asNewEffect(), asCoeff().

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/37593002

git-svn-id: http://skia.googlecode.com/svn/trunk/src@11926 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkXfermode.cpp b/core/SkXfermode.cpp
index 75c6529..d2947ee 100644
--- a/core/SkXfermode.cpp
+++ b/core/SkXfermode.cpp
@@ -673,8 +673,8 @@
     return false;
 }
 
-bool SkXfermode::asNewEffectOrCoeff(GrEffectRef**, Coeff* src, Coeff* dst, GrTexture*) const {
-    return this->asCoeff(src, dst);
+bool SkXfermode::asNewEffect(GrEffectRef** effect, GrTexture* background) const {
+    return false;
 }
 
 bool SkXfermode::AsNewEffectOrCoeff(SkXfermode* xfermode,
@@ -684,8 +684,10 @@
                                     GrTexture* background) {
     if (NULL == xfermode) {
         return ModeAsCoeff(kSrcOver_Mode, src, dst);
+    } else if (xfermode->asCoeff(src, dst)) {
+        return true;
     } else {
-        return xfermode->asNewEffectOrCoeff(effect, src, dst, background);
+        return xfermode->asNewEffect(effect, background);
     }
 }
 
@@ -1363,13 +1365,8 @@
 }
 
 #if SK_SUPPORT_GPU
-bool SkProcCoeffXfermode::asNewEffectOrCoeff(GrEffectRef** effect,
-                                             Coeff* src,
-                                             Coeff* dst,
-                                             GrTexture* background) const {
-    if (this->asCoeff(src, dst)) {
-        return true;
-    }
+bool SkProcCoeffXfermode::asNewEffect(GrEffectRef** effect,
+                                      GrTexture* background) const {
     if (XferEffect::IsSupportedMode(fMode)) {
         if (NULL != effect) {
             *effect = XferEffect::Create(fMode, background);
diff --git a/core/SkXfermode_proccoeff.h b/core/SkXfermode_proccoeff.h
index bba8b39..df2b974 100644
--- a/core/SkXfermode_proccoeff.h
+++ b/core/SkXfermode_proccoeff.h
@@ -29,10 +29,8 @@
     virtual bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE;
 
 #if SK_SUPPORT_GPU
-    virtual bool asNewEffectOrCoeff(GrEffectRef** effect,
-                                    Coeff* src,
-                                    Coeff* dst,
-                                    GrTexture* background) const SK_OVERRIDE;
+    virtual bool asNewEffect(GrEffectRef** effect,
+                             GrTexture* background) const SK_OVERRIDE;
 #endif
 
     SK_DEVELOPER_TO_STRING()
diff --git a/effects/SkArithmeticMode.cpp b/effects/SkArithmeticMode.cpp
index 7c4428c..3c445ab 100644
--- a/effects/SkArithmeticMode.cpp
+++ b/effects/SkArithmeticMode.cpp
@@ -36,7 +36,7 @@
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
 
 #if SK_SUPPORT_GPU
-    virtual bool asNewEffectOrCoeff(GrEffectRef** effect, Coeff*, Coeff*, GrTexture* background) const SK_OVERRIDE;
+    virtual bool asNewEffect(GrEffectRef** effect, GrTexture* background) const SK_OVERRIDE;
 #endif
 
 private:
@@ -408,10 +408,7 @@
 
 GR_DEFINE_EFFECT_TEST(GrArithmeticEffect);
 
-bool SkArithmeticMode_scalar::asNewEffectOrCoeff(GrEffectRef** effect,
-                                                 Coeff*,
-                                                 Coeff*,
-                                                 GrTexture* background) const {
+bool SkArithmeticMode_scalar::asNewEffect(GrEffectRef** effect, GrTexture* background) const {
     if (effect) {
         *effect = GrArithmeticEffect::Create(SkScalarToFloat(fK[0]),
                                              SkScalarToFloat(fK[1]),