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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 23120004: Change Atlas recycling to track current flush count and recycle if Atlas not used in current flush. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 8f0f1cfde6a0848136be2c75f2b6afd7c53c8b95..f4a3df6429e05fb31bcf5bdedb87776a70ae3a01 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -148,14 +148,15 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
}
}
+ GrDrawTarget::DrawToken drawToken = fDrawTarget->getCurrentDrawToken();
if (NULL == glyph->fAtlas) {
- if (fStrike->getGlyphAtlas(glyph, scaler)) {
+ if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
goto HAS_ATLAS;
}
// try to clear out an unused atlas before we flush
fContext->getFontCache()->freeAtlasExceptFor(fStrike);
- if (fStrike->getGlyphAtlas(glyph, scaler)) {
+ if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
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, drawToken)) {
goto HAS_ATLAS;
}
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698