Remove empty processing from drawGlyphRunAsBMPWithPathFallback

Change-Id: I9946614342b4a3883b25f749f54dbfc97f3460d4
Reviewed-on: https://skia-review.googlesource.com/c/192104
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index 9df4bbb..b8ddd17 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -370,11 +370,11 @@
     }
 }
 
-template <typename StrikeCreatorT, typename EmptiesT, typename MasksT, typename PathsT>
+template <typename StrikeCreatorT, typename MasksT, typename PathsT>
 void SkGlyphRunListPainter::drawGlyphRunAsBMPWithPathFallback(
         const SkPaint& paint, const SkFont& font, StrikeCreatorT&& strikeCreator,
         const SkGlyphRun& glyphRun, SkPoint origin, const SkMatrix& deviceMatrix,
-        EmptiesT&& processEmpties, MasksT&& processMasks, PathsT&& processPaths) {
+        MasksT&& processMasks, PathsT&& processPaths) {
 
     SkAutoDescriptor ad;
     SkScalerContextEffects effects;
@@ -425,9 +425,6 @@
         }
     }
 
-    if (!emptyGlyphs.empty()) {
-        processEmpties(SkSpan<const SkGlyph*>{emptyGlyphs.data(), emptyGlyphs.size()});
-    }
     if (glyphCount > 0) {
         mapping.mapPoints(fPositions, glyphCount);
         processMasks(SkSpan<const GlyphAndPos>{fMasks, SkTo<size_t>(glyphCount)}, strike.get());
@@ -843,8 +840,6 @@
                 return strikeCache->findOrCreateScopedStrike(desc, effects, typeface);
             };
 
-            auto processEmpties = [](SkSpan<const SkGlyph*>glyphs) {};
-
             auto processMasks =
                 [run, glyphCache]
                 (SkSpan<const SkGlyphRunListPainter::GlyphAndPos> masks,
@@ -874,7 +869,7 @@
             glyphPainter->drawGlyphRunAsBMPWithPathFallback(
                     runPaint, runFont, creator,
                     glyphRun, origin, viewMatrix,
-                    std::move(processEmpties), std::move(processMasks), std::move(processPaths));
+                    std::move(processMasks), std::move(processPaths));
         }
     }
 }
@@ -962,8 +957,6 @@
         return SkScopedStrike{fStrikeServer->getOrCreateCache(desc, typeface, effects)};
     };
 
-    auto processEmpties = [] (SkSpan<const SkGlyph*>glyphs) { };
-
     auto processMasks = [] (
             SkSpan<const SkGlyphRunListPainter::GlyphAndPos> masks, SkStrikeInterface*) { };
 
@@ -972,7 +965,7 @@
     fPainter.drawGlyphRunAsBMPWithPathFallback(
             runPaint, glyphRun.font(), creator,
             glyphRun, origin, runMatrix,
-            std::move(processEmpties), std::move(processMasks), std::move(processPaths));
+            std::move(processMasks), std::move(processPaths));
 }
 
 struct ARGBHelper {
diff --git a/src/core/SkGlyphRunPainter.h b/src/core/SkGlyphRunPainter.h
index d6e0b7d..a918b30 100644
--- a/src/core/SkGlyphRunPainter.h
+++ b/src/core/SkGlyphRunPainter.h
@@ -108,11 +108,11 @@
             const SkGlyphRunList& glyphRunList, const SkMatrix& deviceMatrix,
             const BitmapDevicePainter* bitmapDevice);
 
-    template <typename StrikeCreatorT, typename EmptiesT, typename MasksT, typename PathsT>
+    template <typename StrikeCreatorT, typename MasksT, typename PathsT>
     void drawGlyphRunAsBMPWithPathFallback(
             const SkPaint& paint, const SkFont& font, StrikeCreatorT&& strikeCreator,
             const SkGlyphRun& glyphRun, SkPoint origin, const SkMatrix& deviceMatrix,
-            EmptiesT&& processEmpties, MasksT&& processMasks, PathsT&& processPaths);
+            MasksT&& processMasks, PathsT&& processPaths);
 
     enum NeedsTransform : bool { kTransformDone = false, kDoTransform = true };