| Index: src/gpu/GrTextContext.cpp
|
| diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
|
| index 8f0f1cfde6a0848136be2c75f2b6afd7c53c8b95..c2de920dbe95c272122ed60bcee6b07345290927 100644
|
| --- a/src/gpu/GrTextContext.cpp
|
| +++ b/src/gpu/GrTextContext.cpp
|
| @@ -148,14 +148,15 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
|
| }
|
| }
|
|
|
| + uint64_t flushCount = fContext->getFlushCount();
|
| if (NULL == glyph->fAtlas) {
|
| - if (fStrike->getGlyphAtlas(glyph, scaler)) {
|
| + if (fStrike->getGlyphAtlas(glyph, scaler, flushCount)) {
|
| goto HAS_ATLAS;
|
| }
|
|
|
| // try to clear out an unused atlas before we flush
|
| - fContext->getFontCache()->freeAtlasExceptFor(fStrike);
|
| - if (fStrike->getGlyphAtlas(glyph, scaler)) {
|
| + fContext->getFontCache()->freeAtlasExceptFor(fStrike, flushCount);
|
| + if (fStrike->getGlyphAtlas(glyph, scaler, flushCount)) {
|
| goto HAS_ATLAS;
|
| }
|
|
|
| @@ -165,7 +166,8 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
|
|
|
| // try to purge
|
| fContext->getFontCache()->purgeExceptFor(fStrike);
|
| - if (fStrike->getGlyphAtlas(glyph, scaler)) {
|
| + // need to use new flush count here
|
| + if (fStrike->getGlyphAtlas(glyph, scaler, fContext->getFlushCount())) {
|
| goto HAS_ATLAS;
|
| }
|
|
|
|
|