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

Unified Diff: src/gpu/GrAtlas.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; clean up whitespace. 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/GrAtlas.h
diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
index b6f25c210ab7fdccfa7a98a9b6ff1f22dfbc9341..722031260d5656ac074d262e837bb2d67dd77a89 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -13,6 +13,7 @@
#include "GrPoint.h"
#include "GrTexture.h"
+#include "GrDrawTarget.h"
class GrGpu;
class GrRectanizer;
@@ -36,32 +37,25 @@ public:
}
}
- static void MarkAllUnused(GrAtlas* atlas) {
- while (NULL != atlas) {
- atlas->fUsed = false;
- atlas = atlas->fNext;
- }
- }
-
static bool RemoveUnusedAtlases(GrAtlasMgr* atlasMgr, GrAtlas** startAtlas);
- bool used() const { return fUsed; }
- void setUsed(bool used) { fUsed = used; }
+ GrDrawTarget::FlushToken flushToken() const { return fFlushToken; }
+ void setFlushToken(GrDrawTarget::FlushToken flush) { fFlushToken = flush; }
private:
GrAtlas(GrAtlasMgr*, int plotX, int plotY, GrMaskFormat format);
~GrAtlas(); // does not try to delete the fNext field
- GrAtlas* fNext;
-
// for recycling
- bool fUsed;
+ GrDrawTarget::FlushToken fFlushToken;
+
+ GrAtlas* fNext;
- GrTexture* fTexture;
- GrRectanizer* fRects;
- GrAtlasMgr* fAtlasMgr;
- GrIPoint16 fPlot;
- GrMaskFormat fMaskFormat;
+ GrTexture* fTexture;
+ GrRectanizer* fRects;
+ GrAtlasMgr* fAtlasMgr;
+ GrIPoint16 fPlot;
+ GrMaskFormat fMaskFormat;
friend class GrAtlasMgr;
};
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAtlas.cpp » ('j') | src/gpu/GrDrawTarget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698