From 30da1c4631daab0db5bbd755aa5fda50352746ee Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Mon, 16 Jul 2018 14:49:30 -0400 Subject: Remove processText last vestige of drawText Change-Id: I03a8c094533cdda1e6e3a43d0124889ef6476b0b Reviewed-on: https://skia-review.googlesource.com/141560 Commit-Queue: Herb Derby Reviewed-by: Ben Wagner --- src/core/SkFindAndPlaceGlyph.h | 47 ------------------------------------------ 1 file changed, 47 deletions(-) diff --git a/src/core/SkFindAndPlaceGlyph.h b/src/core/SkFindAndPlaceGlyph.h index 6b157358e8..ae98faa1e5 100644 --- a/src/core/SkFindAndPlaceGlyph.h +++ b/src/core/SkFindAndPlaceGlyph.h @@ -19,11 +19,6 @@ class SkFindAndPlaceGlyph { public: - template - static void ProcessText( - SkPaint::TextEncoding, const char text[], size_t byteLength, - SkPoint offset, const SkMatrix& matrix, SkPaint::Align textAlignment, - SkGlyphCache* cache, ProcessOneGlyph&& processOneGlyph); // ProcessPosText handles all cases for finding and positioning glyphs. It has a very large // multiplicity. It figures out the glyph, position and rounding and pass those parameters to // processOneGlyph. @@ -488,46 +483,4 @@ inline void SkFindAndPlaceGlyph::ProcessPosText( } } -template -inline void SkFindAndPlaceGlyph::ProcessText( - SkPaint::TextEncoding textEncoding, const char text[], size_t byteLength, - SkPoint offset, const SkMatrix& matrix, SkPaint::Align textAlignment, - SkGlyphCache* cache, ProcessOneGlyph&& processOneGlyph) { - SkSTArenaAlloc<64> arena; - - // transform the starting point - matrix.mapPoints(&offset, 1); - - GlyphFinderInterface* glyphFinder = getGlyphFinder(&arena, textEncoding, cache); - - // need to measure first - if (textAlignment != SkPaint::kLeft_Align) { - SkVector stop = MeasureText(glyphFinder, text, byteLength); - - if (textAlignment == SkPaint::kCenter_Align) { - stop *= SK_ScalarHalf; - } - offset -= stop; - } - - GlyphFindAndPlaceInterface* findAndPosition = nullptr; - if (cache->isSubpixel()) { - SkAxisAlignment axisAlignment = cache->getScalerContext()->computeAxisAlignmentForHText(); - findAndPosition = getSubpixel( - &arena, axisAlignment, glyphFinder); - } else { - using FullPixel = GlyphFindAndPlaceFullPixel; - findAndPosition = arena.make(glyphFinder); - } - - const char* stop = text + byteLength; - SkPoint current = offset; - while (text < stop) { - current = - findAndPosition->findAndPositionGlyph( - &text, current, std::forward(processOneGlyph)); - - } -} - #endif // SkFindAndPositionGlyph_DEFINED -- cgit v1.2.3