aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTextToPathIter.h
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-03-07 18:05:39 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-07 18:05:51 +0000
commitab6fd7ef91aeca8a3fbbc6c6670cb89a5a7b6d53 (patch)
treee98936f124d58dafe85aab73b3a85fd8279e1d8a /src/core/SkTextToPathIter.h
parente64b064f87018cc84ad843b3cad3185f87917fe8 (diff)
Revert "Remove attach and detach glyph cache."
This reverts commit 61d56b92a4076f8afd644d015913641d691e39c8. Reason for revert: broke gldft text Original change's description: > Remove attach and detach glyph cache. > > BUG=skia:7515 > > Change-Id: Ib978e3cf4cfffdefe6453feb520e5e73684abf2e > Reviewed-on: https://skia-review.googlesource.com/112560 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=bungeman@google.com,herb@google.com Change-Id: Id5723a3abcd103ed20197bba2dab06e8074be633 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/112745 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkTextToPathIter.h')
-rw-r--r--src/core/SkTextToPathIter.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/SkTextToPathIter.h b/src/core/SkTextToPathIter.h
index 8bcbc21b4d..6de12a84ce 100644
--- a/src/core/SkTextToPathIter.h
+++ b/src/core/SkTextToPathIter.h
@@ -9,21 +9,22 @@
#define SkTextToPathIter_DEFINED
#include "SkAutoKern.h"
-#include "SkGlyphCache.h"
#include "SkPaint.h"
+class SkGlyphCache;
class SkTextBaseIter {
protected:
SkTextBaseIter(const char text[], size_t length, const SkPaint& paint,
bool applyStrokeAndPathEffects);
-
- SkExclusiveStrikePtr fCache;
- SkPaint fPaint;
- SkScalar fScale;
- SkScalar fPrevAdvance;
- const char* fText;
- const char* fStop;
+ ~SkTextBaseIter();
+
+ SkGlyphCache* fCache;
+ SkPaint fPaint;
+ SkScalar fScale;
+ SkScalar fPrevAdvance;
+ const char* fText;
+ const char* fStop;
SkPaint::GlyphCacheProc fGlyphCacheProc;
SkScalar fXPos; // accumulated xpos, returned in next
@@ -73,7 +74,7 @@ public:
if (TextType::kPosText == fTextType
&& fPaint.getTextAlign() != SkPaint::kLeft_Align) { // need to measure first
const char* text = fText;
- const SkGlyph& glyph = fGlyphCacheProc(fCache.get(), &text);
+ const SkGlyph& glyph = fGlyphCacheProc(fCache, &text);
SkScalar width = (&glyph.fAdvanceX)[0] * fScale;
if (fPaint.getTextAlign() == SkPaint::kCenter_Align) {
width = SkScalarHalf(width);