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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 1020593003: Ensure that we use different glyph entries for regular and df text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years, 9 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/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrFontCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 2a439da4f27e5743171f8338fbeadb7d4720f0ce..180c506e33d271176a2ea9e3325f63cf69279882 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -319,7 +319,8 @@ void GrDistanceFieldTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip&
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
- glyph.getSubYFixed()),
+ glyph.getSubYFixed(),
+ GrGlyph::kDistance_MaskStyle),
x, y, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(SkToInt(text-lastText), lastText);
@@ -348,7 +349,8 @@ void GrDistanceFieldTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip&
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
- glyph.getSubYFixed()),
+ glyph.getSubYFixed(),
+ GrGlyph::kDistance_MaskStyle),
x - advanceX, y - advanceY, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(SkToInt(text-lastText), lastText);
@@ -509,7 +511,7 @@ bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
}
if (NULL == fStrike) {
- fStrike = fContext->getFontCache()->getStrike(scaler, true);
+ fStrike = fContext->getFontCache()->getStrike(scaler);
}
GrGlyph* glyph = fStrike->getGlyph(packed, scaler);
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrFontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698