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

Unified Diff: include/gpu/GrGpuResource.h

Issue 2321563006: Make GrResourceCache dynamically change between LRU and random replacement strategies. (Closed)
Patch Set: fix recursive flusing, add asserts Created 4 years, 2 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/GrDrawingManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 364a886408cf841dded13491d811cac14fe3cde1..6f8280acb2173b304305f0a06ae8cca8ca69a980 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -58,6 +58,7 @@ public:
this->validate();
if (!(--fRefCnt)) {
+ SkASSERT(fRefCnt >= 0);
if (!static_cast<const DERIVED*>(this)->notifyRefCountIsZero()) {
return;
}
@@ -117,6 +118,7 @@ private:
private:
void didRemoveRefOrPendingIO(CntType cntTypeRemoved) const {
+ this->validate();
if (0 == fPendingReads && 0 == fPendingWrites && 0 == fRefCnt) {
static_cast<const DERIVED*>(this)->notifyAllCntsAreZero(cntTypeRemoved);
}
« no previous file with comments | « no previous file | src/gpu/GrDrawingManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698