diff options
-rw-r--r-- | src/core/SkFindAndPlaceGlyph.h | 47 |
1 files changed, 0 insertions, 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<typename ProcessOneGlyph> - 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<typename ProcessOneGlyph> -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<ProcessOneGlyph>* findAndPosition = nullptr; - if (cache->isSubpixel()) { - SkAxisAlignment axisAlignment = cache->getScalerContext()->computeAxisAlignmentForHText(); - findAndPosition = getSubpixel<ProcessOneGlyph>( - &arena, axisAlignment, glyphFinder); - } else { - using FullPixel = GlyphFindAndPlaceFullPixel<ProcessOneGlyph>; - findAndPosition = arena.make<FullPixel>(glyphFinder); - } - - const char* stop = text + byteLength; - SkPoint current = offset; - while (text < stop) { - current = - findAndPosition->findAndPositionGlyph( - &text, current, std::forward<ProcessOneGlyph>(processOneGlyph)); - - } -} - #endif // SkFindAndPositionGlyph_DEFINED |