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; |
} |