Rename UseRasterPipelineBlitter to UseLegacyBlitter.

This function was misleadingly named. It is meant to detect the cases
where we still want to use the legacy blitter; it does not actually
detect that we want to use the raster pipeline. Raster pipeline usage
is determined later by `create_SkRP_or_SkVMBlitter`.

The name probably made more sense before SkVMBlitter was introduced,
when the only two choices were "RasterPipeline" or "Legacy."

Change-Id: I4ed80e5d49a23ed22b3d34eb8a707cd752b5cc5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418143
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 98a178d..73e2d26 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -642,18 +642,19 @@
 
 #include "src/core/SkCoreBlitters.h"
 
-bool SkBlitter::UseRasterPipelineBlitter(const SkPixmap& device, const SkPaint& paint,
-                                         const SkMatrix& matrix) {
+bool SkBlitter::UseLegacyBlitter(const SkPixmap& device,
+                                 const SkPaint& paint,
+                                 const SkMatrix& matrix) {
     if (gSkForceRasterPipelineBlitter) {
-        return true;
+        return false;
     }
-#if 0 || defined(SK_FORCE_RASTER_PIPELINE_BLITTER)
-    return true;
+#if defined(SK_FORCE_RASTER_PIPELINE_BLITTER)
+    return false;
 #else
 
 #if !defined(SK_SUPPORT_LEGACY_DITHER)
     if (paint.isDither()) {
-        return true;
+        return false;
     }
 #endif
 
@@ -663,13 +664,13 @@
     if (device.alphaType() == kUnpremul_SkAlphaType        ||
         paint.getBlendMode() > SkBlendMode::kLastCoeffMode ||
         (mf && mf->getFormat() == SkMask::k3D_Format)) {
-        return true;
+        return false;
     }
 
     // All the real legacy fast paths are for shaders and SrcOver.
     // Choosing SkRasterPipelineBlitter will also let us to hit its single-color memset path.
     if (!paint.getShader() && paint.getBlendMode() != SkBlendMode::kSrcOver) {
-        return true;
+        return false;
     }
 
     auto cs = device.colorSpace();
@@ -677,13 +678,13 @@
     // in legacy mode, so here we just focus on if a single color needs raster-pipeline.
     if (cs && !paint.getShader()) {
         if (!paint.getColor4f().fitsInBytes() || !cs->isSRGB()) {
-            return true;
+            return false;
         }
     }
 
     // Only kN32 and 565 are handled by legacy blitters now, 565 mostly just for Android.
-    return device.colorType() != kN32_SkColorType
-        && device.colorType() != kRGB_565_SkColorType;
+    return device.colorType() == kN32_SkColorType
+        || device.colorType() == kRGB_565_SkColorType;
 #endif
 }
 
@@ -765,7 +766,7 @@
 
     SkMatrix ctm = matrixProvider.localToDevice();
     // We'll end here for many interesting cases: color spaces, color filters, most color types.
-    if (UseRasterPipelineBlitter(device, *paint, ctm) || clipShader) {
+    if (clipShader || !UseLegacyBlitter(device, *paint, ctm)) {
         return create_SkRP_or_SkVMBlitter();
     }
 
diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h
index 46150db..026a4b9 100644
--- a/src/core/SkBlitter.h
+++ b/src/core/SkBlitter.h
@@ -154,7 +154,7 @@
                                    SkArenaAlloc*, sk_sp<SkShader> clipShader);
     ///@}
 
-    static bool UseRasterPipelineBlitter(const SkPixmap&, const SkPaint&, const SkMatrix&);
+    static bool UseLegacyBlitter(const SkPixmap&, const SkPaint&, const SkMatrix&);
 
 protected:
     SkAutoMalloc fBlitMemory;