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

Unified Diff: src/gpu/text/GrStencilAndCoverTextContext.cpp

Issue 2163633002: Make SkFont a bit more useable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bug Created 4 years, 5 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 | « src/core/SkPaint.cpp ('k') | src/gpu/text/GrTextUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index dd930255262942825f24cafb72b6c223a41292fd..632bdcdaf195b4affb6c7a5a0e95461386d05132 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -469,7 +469,9 @@ void GrStencilAndCoverTextContext::TextRun::setText(const char text[], size_t by
SkASSERT(byteLength == 0 || text != nullptr);
SkGlyphCache* glyphCache = this->getGlyphCache();
- SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
+ SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(fFont.getTextEncoding(),
+ fFont.isDevKernText(),
+ true);
fTotalGlyphCount = fFont.countText(text, byteLength);
fInstanceData.reset(InstanceData::Alloc(GrPathRendering::kTranslate_PathTransformType,
@@ -529,7 +531,9 @@ void GrStencilAndCoverTextContext::TextRun::setPosText(const char text[], size_t
SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
SkGlyphCache* glyphCache = this->getGlyphCache();
- SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
+ SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(fFont.getTextEncoding(),
+ fFont.isDevKernText(),
+ true);
fTotalGlyphCount = fFont.countText(text, byteLength);
fInstanceData.reset(InstanceData::Alloc(GrPathRendering::kTranslate_PathTransformType,
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/text/GrTextUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698