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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 636183005: Fix color emoji. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Check for atlas ownership when searching ClientPlotUsage. Created 6 years, 2 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/GrFontScaler.cpp » ('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 baba10d570614ec2d106e12138ffd7a64242a9f2..a1f5ce66608bac5cdf9ab934faffde042257f25d 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -412,6 +412,11 @@ void GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
return;
}
+ // TODO: support color glyphs
+ if (kA8_GrMaskFormat != glyph->fMaskFormat) {
+ return;
+ }
+
SkScalar sx = SkFixedToScalar(vx);
SkScalar sy = SkFixedToScalar(vy);
/*
@@ -440,7 +445,7 @@ void GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
}
// try to clear out an unused plot before we flush
- if (fContext->getFontCache()->freeUnusedPlot(fStrike) &&
+ if (fContext->getFontCache()->freeUnusedPlot(fStrike, glyph) &&
fStrike->addGlyphToAtlas(glyph, scaler)) {
goto HAS_ATLAS;
}
@@ -456,7 +461,7 @@ void GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
fContext->flush();
// we should have an unused plot now
- if (fContext->getFontCache()->freeUnusedPlot(fStrike) &&
+ if (fContext->getFontCache()->freeUnusedPlot(fStrike, glyph) &&
fStrike->addGlyphToAtlas(glyph, scaler)) {
goto HAS_ATLAS;
}
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrFontScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698