aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text')
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp10
-rw-r--r--src/gpu/text/GrTextUtils.cpp18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index a87e5d2b9d..52281b2bbe 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -440,7 +440,7 @@ void GrStencilAndCoverTextContext::TextRun::setText(const char text[], size_t by
SkASSERT(byteLength == 0 || text != nullptr);
SkGlyphCache* glyphCache = this->getGlyphCache();
- SkDrawCacheProc glyphCacheProc = fFont.getDrawCacheProc();
+ SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
fTotalGlyphCount = fFont.countText(text, byteLength);
fInstanceData.reset(InstanceData::Alloc(GrPathRendering::kTranslate_PathTransformType,
@@ -457,7 +457,7 @@ void GrStencilAndCoverTextContext::TextRun::setText(const char text[], size_t by
while (textPtr < stop) {
// We don't need x, y here, since all subpixel variants will have the
// same advance.
- const SkGlyph& glyph = glyphCacheProc(glyphCache, &textPtr, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(glyphCache, &textPtr);
stopX += glyph.fAdvanceX;
stopY += glyph.fAdvanceY;
@@ -484,7 +484,7 @@ void GrStencilAndCoverTextContext::TextRun::setText(const char text[], size_t by
SkFixed fy = SkScalarToFixed(y);
FallbackBlobBuilder fallback;
while (text < stop) {
- const SkGlyph& glyph = glyphCacheProc(glyphCache, &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(glyphCache, &text);
fx += SkFixedMul(autokern.adjust(glyph), fixedSizeRatio);
if (glyph.fWidth) {
this->appendGlyph(glyph, SkPoint::Make(SkFixedToScalar(fx), SkFixedToScalar(fy)),
@@ -505,7 +505,7 @@ void GrStencilAndCoverTextContext::TextRun::setPosText(const char text[], size_t
SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
SkGlyphCache* glyphCache = this->getGlyphCache();
- SkDrawCacheProc glyphCacheProc = fFont.getDrawCacheProc();
+ SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
fTotalGlyphCount = fFont.countText(text, byteLength);
fInstanceData.reset(InstanceData::Alloc(GrPathRendering::kTranslate_PathTransformType,
@@ -517,7 +517,7 @@ void GrStencilAndCoverTextContext::TextRun::setPosText(const char text[], size_t
SkTextAlignProc alignProc(fFont.getTextAlign());
FallbackBlobBuilder fallback;
while (text < stop) {
- const SkGlyph& glyph = glyphCacheProc(glyphCache, &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(glyphCache, &text);
if (glyph.fWidth) {
SkPoint tmsLoc;
tmsProc(pos, &tmsLoc);
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp
index 112f5bd319..c46ea73d05 100644
--- a/src/gpu/text/GrTextUtils.cpp
+++ b/src/gpu/text/GrTextUtils.cpp
@@ -258,7 +258,7 @@ void GrTextUtils::DrawDFText(GrAtlasTextBlob* blob, int runIndex,
return;
}
- SkDrawCacheProc glyphCacheProc = skPaint.getDrawCacheProc();
+ SkPaint::GlyphCacheProc glyphCacheProc = skPaint.getGlyphCacheProc(true);
SkAutoDescriptor desc;
skPaint.getScalerContextDescriptor(&desc, props, SkPaint::FakeGamma::Off, nullptr);
SkGlyphCache* origPaintCache = SkGlyphCache::DetachCache(skPaint.getTypeface(),
@@ -281,7 +281,7 @@ void GrTextUtils::DrawDFText(GrAtlasTextBlob* blob, int runIndex,
while (textPtr < stop) {
// don't need x, y here, since all subpixel variants will have the
// same advance
- const SkGlyph& glyph = glyphCacheProc(origPaintCache, &textPtr, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(origPaintCache, &textPtr);
SkFixed width = glyph.fAdvanceX + autokern.adjust(glyph);
positions.push_back(SkFixedToScalar(stopX + SkFixedMul(origin, width)));
@@ -343,7 +343,7 @@ void GrTextUtils::DrawDFPosText(GrAtlasTextBlob* blob, int runIndex,
SkGlyphCache* cache = blob->setupCache(runIndex, props, SkPaint::FakeGamma::Off,
dfPaint, nullptr);
- SkDrawCacheProc glyphCacheProc = dfPaint.getDrawCacheProc();
+ SkPaint::GlyphCacheProc glyphCacheProc = dfPaint.getGlyphCacheProc(true);
GrFontScaler* fontScaler = GrTextUtils::GetGrFontScaler(cache);
const char* stop = text + byteLength;
@@ -352,7 +352,7 @@ void GrTextUtils::DrawDFPosText(GrAtlasTextBlob* blob, int runIndex,
while (text < stop) {
const char* lastText = text;
// the last 2 parameters are ignored
- const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(cache, &text);
if (glyph.fWidth) {
SkScalar x = offset.x() + pos[0];
@@ -381,7 +381,7 @@ void GrTextUtils::DrawDFPosText(GrAtlasTextBlob* blob, int runIndex,
while (text < stop) {
const char* lastText = text;
// the last 2 parameters are ignored
- const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(cache, &text);
if (glyph.fWidth) {
SkScalar x = offset.x() + pos[0];
@@ -507,9 +507,9 @@ void GrTextUtils::DrawPosTextAsPath(GrContext* context,
paint.setStyle(SkPaint::kFill_Style);
paint.setPathEffect(nullptr);
- SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
- SkAutoGlyphCache autoCache(paint, &props, nullptr);
- SkGlyphCache* cache = autoCache.getCache();
+ SkPaint::GlyphCacheProc glyphCacheProc = paint.getGlyphCacheProc(true);
+ SkAutoGlyphCache autoCache(paint, &props, nullptr);
+ SkGlyphCache* cache = autoCache.getCache();
const char* stop = text + byteLength;
SkTextAlignProc alignProc(paint.getTextAlign());
@@ -520,7 +520,7 @@ void GrTextUtils::DrawPosTextAsPath(GrContext* context,
paint.setPathEffect(origPaint.getPathEffect());
while (text < stop) {
- const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
+ const SkGlyph& glyph = glyphCacheProc(cache, &text);
if (glyph.fWidth) {
const SkPath* path = cache->findPath(glyph);
if (path) {