diff options
author | Herb Derby <herb@google.com> | 2018-03-15 11:09:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-15 16:59:46 +0000 |
commit | c2ec4e8d83e42d7059528e3ccc7c3ab584ed1f31 (patch) | |
tree | d24bb673bc9113c0aabb663a5615ba8d8cba5ea2 /src/core/SkDraw.cpp | |
parent | 7f4419696b8ef299a321561336c0353a5a7d8e61 (diff) |
SkAutoGlyphCache change some sites to Find*.
Change-Id: Iec3a0c60106017394fcdd981052713b6e42fa595
Reviewed-on: https://skia-review.googlesource.com/114506
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r-- | src/core/SkDraw.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index cf06b7b3b5..e231f01bfa 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1540,7 +1540,8 @@ void SkDraw::drawText(const char text[], size_t byteLength, SkScalar x, SkScalar return; } - SkAutoGlyphCache cache(paint, props, this->scalerContextFlags(), fMatrix); + auto cache = SkGlyphCache::FindOrCreateStrikeExclusive( + paint, props, this->scalerContextFlags(), fMatrix); // The Blitter Choose needs to be live while using the blitter below. SkAutoBlitterChoose blitterChooser(fDst, *fMatrix, paint); @@ -1571,7 +1572,8 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength, const SkS SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(), paint.isDevKernText(), true); - SkAutoGlyphCache cache(paint, props, this->scalerContextFlags(), nullptr); + auto cache = SkGlyphCache::FindOrCreateStrikeExclusive( + paint, props, this->scalerContextFlags(), nullptr); const char* stop = text + byteLength; SkTextAlignProc alignProc(paint.getTextAlign()); @@ -1618,7 +1620,8 @@ void SkDraw::drawPosText(const char text[], size_t byteLength, const SkScalar po return; } - SkAutoGlyphCache cache(paint, props, this->scalerContextFlags(), fMatrix); + auto cache = SkGlyphCache::FindOrCreateStrikeExclusive( + paint, props, this->scalerContextFlags(), fMatrix); // The Blitter Choose needs to be live while using the blitter below. SkAutoBlitterChoose blitterChooser(fDst, *fMatrix, paint); |