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

Unified Diff: src/gpu/GrResourceCache.cpp

Issue 18770007: Add a 'unique' method to SkRefCnt, document the usage, and add support. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Update comments. Created 7 years, 5 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 | « src/gpu/GrEffect.cpp ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache.cpp
===================================================================
--- src/gpu/GrResourceCache.cpp (revision 10200)
+++ src/gpu/GrResourceCache.cpp (working copy)
@@ -164,7 +164,7 @@
class GrTFindUnreffedFunctor {
public:
bool operator()(const GrResourceEntry* entry) const {
- return 1 == entry->resource()->getRefCnt();
+ return entry->resource()->unique();
}
};
@@ -338,7 +338,7 @@
}
GrResourceEntry* prev = iter.prev();
- if (1 == entry->fResource->getRefCnt()) {
+ if (entry->fResource->unique()) {
changed = true;
this->deleteResource(entry);
}
« no previous file with comments | « src/gpu/GrEffect.cpp ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698