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

Unified Diff: src/gpu/GrResourceCache.h

Issue 916103006: Handle the case when the GrResourceCache timestamp wraps. (Closed) Base URL: https://skia.googlesource.com/skia.git@sharesb
Patch Set: fix warning Created 5 years, 10 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 | « no previous file | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache.h
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index 3e5df38d7729fabd3edb920be4ef22555366ea13..8331bf5d1642b44e82b813d5ab2a800719076732 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -171,6 +171,9 @@ public:
void dumpStats(SkString*) const;
#endif
+ // This function is for unit testing and is only defined in test tools.
+ void changeTimestamp(uint32_t newTimestamp);
+
private:
///////////////////////////////////////////////////////////////////////////
/// @name Methods accessible via ResourceAccess
@@ -192,6 +195,8 @@ private:
void removeFromNonpurgeableArray(GrGpuResource*);
bool overBudget() const { return fBudgetedBytes > fMaxBytes || fBudgetedCount > fMaxCount; }
+ uint32_t getNextTimestamp();
+
#ifdef SK_DEBUG
bool isInCache(const GrGpuResource* r) const;
void validate() const;
« no previous file with comments | « no previous file | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698