aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-07-16 14:49:30 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-16 20:16:39 +0000
commit30da1c4631daab0db5bbd755aa5fda50352746ee (patch)
tree70f2985e15e6dff5842390c4e939dc88f3d58d7b
parent103dcca605303f1f1be5757eb411eac240837a11 (diff)
Remove processText last vestige of drawText
Change-Id: I03a8c094533cdda1e6e3a43d0124889ef6476b0b Reviewed-on: https://skia-review.googlesource.com/141560 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
-rw-r--r--src/core/SkFindAndPlaceGlyph.h47
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