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

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: 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 | « include/gpu/GrContext.h ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.h
diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
index b6f25c210ab7fdccfa7a98a9b6ff1f22dfbc9341..7831a8d0f70476cf0235e7cda5d2ab312602af8e 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::DrawToken drawToken() const { return fDrawToken; }
+ void setDrawToken(GrDrawTarget::DrawToken draw) { fDrawToken = draw; }
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::DrawToken fDrawToken;
+
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698