Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: src/core/SkDraw.cpp

Issue 1718423002: Simplify and combine SkDrawCacheProc and SkMeasureCacheProc to SkPaint::GlyphCacheProc. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index b041df8f7a64ba74c3f1520eeabcd51354042853..13e36423e088618b1ec902b7914e3db77712f2ed 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1606,8 +1606,8 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
paint.setStyle(SkPaint::kFill_Style);
paint.setPathEffect(nullptr);
- SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
- SkAutoGlyphCache cache(paint, &fDevice->surfaceProps(), this->fakeGamma(), nullptr);
+ SkPaint::GlyphCacheProc glyphCacheProc = paint.getGlyphCacheProc(true);
+ SkAutoGlyphCache cache(paint, &fDevice->surfaceProps(), this->fakeGamma(), nullptr);
const char* stop = text + byteLength;
SkTextAlignProc alignProc(paint.getTextAlign());
@@ -1618,7 +1618,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
paint.setPathEffect(origPaint.getPathEffect());
while (text < stop) {
- const SkGlyph& glyph = glyphCacheProc(cache.get(), &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(cache.get(), &text);
if (glyph.fWidth) {
const SkPath* path = cache->findPath(glyph);
if (path) {
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698