revert name changes to SkBlendImageFilter. It (correctly) named its enum kMultiply_Mode,
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 1 Feb 2013 14:35:09 +0000 (14:35 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 1 Feb 2013 14:35:09 +0000 (14:35 +0000)
and handled that itself internally, rather than calling SkXfermode. This CL removes
the kModulate_Mode alias from its list.

git-svn-id: http://skia.googlecode.com/svn/trunk@7509 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/blend.cpp
include/effects/SkBlendImageFilter.h
src/effects/SkBlendImageFilter.cpp

index 5b4ff987f8647389dd7ba5bafcd7346828e62fcc..452eb4945cb91f464eca7b10efa64e20b2f9770b 100644 (file)
@@ -82,7 +82,7 @@ protected:
         SkAutoTUnref<SkImageFilter> background(SkNEW_ARGS(SkBitmapSource, (fCheckerboard)));
         paint.setImageFilter(SkNEW_ARGS(SkBlendImageFilter, (SkBlendImageFilter::kNormal_Mode, background)))->unref();
         drawClippedBitmap(canvas, paint, 0);
-        paint.setImageFilter(SkNEW_ARGS(SkBlendImageFilter, (SkBlendImageFilter::kModulate_Mode, background)))->unref();
+        paint.setImageFilter(SkNEW_ARGS(SkBlendImageFilter, (SkBlendImageFilter::kMultiply_Mode, background)))->unref();
         drawClippedBitmap(canvas, paint, 100);
         paint.setImageFilter(SkNEW_ARGS(SkBlendImageFilter, (SkBlendImageFilter::kScreen_Mode, background)))->unref();
         drawClippedBitmap(canvas, paint, 200);
index 2264273ed7ecffd4d25d2081562d35a25810cf34..a2dc847494276eceeed20626eba8cfda440e0609 100644 (file)
@@ -15,8 +15,7 @@ class SK_API SkBlendImageFilter : public SkImageFilter {
 public:
     enum Mode {
       kNormal_Mode,
-      kModulate_Mode, // TODO: replace this with the (soon to be) SkXfermode version of kMultiply_Mode
-      kMultiply_Mode = kModulate_Mode,
+      kMultiply_Mode,
       kScreen_Mode,
       kDarken_Mode,
       kLighten_Mode,
index 46f25648fa151b60fc929f089ad14e734c4b115e..3f6d3c575f66c30e86c352169a919bf632a565d5 100644 (file)
@@ -24,7 +24,7 @@ SkXfermode::Mode modeToXfermode(SkBlendImageFilter::Mode mode)
     switch (mode) {
       case SkBlendImageFilter::kNormal_Mode:
         return SkXfermode::kSrcOver_Mode;
-      case SkBlendImageFilter::kModulate_Mode:
+      case SkBlendImageFilter::kMultiply_Mode:
         return SkXfermode::kModulate_Mode;
       case SkBlendImageFilter::kScreen_Mode:
         return SkXfermode::kScreen_Mode;
@@ -100,7 +100,7 @@ bool SkBlendImageFilter::onFilterImage(Proxy* proxy,
     // FEBlend's multiply mode is (1 - Sa) * Da + (1 - Da) * Sc + Sc * Dc
     // Skia's is just Sc * Dc.  So we use a custom proc to implement FEBlend's
     // version.
-    if (fMode == SkBlendImageFilter::kModulate_Mode) {
+    if (fMode == SkBlendImageFilter::kMultiply_Mode) {
         paint.setXfermode(new SkProcXfermode(multiply_proc))->unref();
     } else {
         paint.setXfermodeMode(modeToXfermode(fMode));
@@ -283,7 +283,7 @@ void GrGLBlendEffect::emitCode(GrGLShaderBuilder* builder,
       case SkBlendImageFilter::kNormal_Mode:
         code->appendf("\t\t%s.rgb = (1.0 - %s.a) * %s.rgb + %s.rgb;\n", outputColor, fgColor, bgColor, fgColor);
         break;
-      case SkBlendImageFilter::kModulate_Mode:
+      case SkBlendImageFilter::kMultiply_Mode:
         code->appendf("\t\t%s.rgb = (1.0 - %s.a) * %s.rgb + (1.0 - %s.a) * %s.rgb + %s.rgb * %s.rgb;\n", outputColor, fgColor, bgColor, bgColor, fgColor, fgColor, bgColor);
         break;
       case SkBlendImageFilter::kScreen_Mode: