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

Unified Diff: src/gpu/GrTextStrike.h

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: Disable font cache stats 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
Index: src/gpu/GrTextStrike.h
diff --git a/src/gpu/GrTextStrike.h b/src/gpu/GrTextStrike.h
index e359e267cf9816877a1db4d52011a4dc5b59efeb..c57cdc6c2da60194ccc5e3695963289c8f2c858b 100644
--- a/src/gpu/GrTextStrike.h
+++ b/src/gpu/GrTextStrike.h
@@ -37,7 +37,7 @@ public:
GrMaskFormat getMaskFormat() const { return fMaskFormat; }
inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*);
- bool getGlyphAtlas(GrGlyph*, GrFontScaler*);
+ bool getGlyphAtlas(GrGlyph*, GrFontScaler*, uint64_t currentFlushCount);
// testing
int countGlyphs() const { return fCache.getArray().count(); }
@@ -47,7 +47,7 @@ public:
GrAtlas* getAtlas() const { return fAtlas; }
// returns true if an atlas was removed
- bool removeUnusedAtlases();
+ bool removeUnusedAtlases(uint64_t currentFlushCount);
public:
// for LRU
@@ -85,7 +85,7 @@ public:
void purgeExceptFor(GrTextStrike*);
// remove an unused atlas and its strike (if necessary)
- void freeAtlasExceptFor(GrTextStrike*);
+ void freeAtlasExceptFor(GrTextStrike*, uint64_t currentFlushCount);
// testing
int countStrikes() const { return fCache.getArray().count(); }

Powered by Google App Engine
This is Rietveld 408576698