Index: src/gpu/GrAtlasTextContext.cpp |
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp |
index 08e6a9a25ef1c19b0ee54c3cdedfd105aec6dd65..38edc8e55881bc7e8cb7251303f14821b9f43b98 100644 |
--- a/src/gpu/GrAtlasTextContext.cpp |
+++ b/src/gpu/GrAtlasTextContext.cpp |
@@ -821,6 +821,7 @@ public: |
GrBatchTextStrike* strike = NULL; |
bool brokenRun = false; |
if (regenerateTextureCoords) { |
+ info.fBulkUseToken.reset(); |
desc = run.fDescriptor.getDesc(); |
cache = SkGlyphCache::DetachCache(run.fTypeface, desc); |
scaler = GrTextContext::GetGrFontScaler(cache); |
@@ -846,8 +847,8 @@ public: |
scaler); |
SkASSERT(success); |
} |
- |
- fFontCache->setGlyphRefToken(glyph, batchTarget->currentToken()); |
+ fFontCache->addGlyphToBulkAndSetUseToken(&info.fBulkUseToken, glyph, |
+ batchTarget->currentToken()); |
// Texture coords are the last vertex attribute so we get a pointer to the |
// first one and then map with stride in regenerateTextureCoords |
@@ -876,6 +877,12 @@ public: |
} |
} else { |
instancesToFlush += glyphCount; |
+ |
+ // set use tokens for all of the glyphs in our subrun. This is only valid if we |
+ // have a valid atlas generation |
+ fFontCache->setUseTokenBulk(info.fBulkUseToken, |
+ batchTarget->currentToken(), |
+ fMaskFormat); |
} |
// now copy all vertices |