aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrStencilAndCoverTextContext.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-07-19 07:59:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-19 07:59:22 -0700
commite34f17d23699abfc672289f51319b37294b3c257 (patch)
treeeef74fb1356491c4a23c31e32ead9a275a8fa09c /src/gpu/text/GrStencilAndCoverTextContext.cpp
parentb117ff194ff888ef9107a4797aad053b0d76be30 (diff)
Make SkFont a bit more useable
Split out of https://codereview.chromium.org/2163483002/ (Use SkFont in GrStencilAndCoverTextContext) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163633002 Review-Url: https://codereview.chromium.org/2163633002
Diffstat (limited to 'src/gpu/text/GrStencilAndCoverTextContext.cpp')
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index dd93025526..632bdcdaf1 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,