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

Unified Diff: src/image/SkSurface.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/GrResourceCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface.cpp
===================================================================
--- src/image/SkSurface.cpp (revision 10200)
+++ src/image/SkSurface.cpp (working copy)
@@ -50,7 +50,7 @@
// the surface may need to fork its backend, if its sharing it with
// the cached image. Note: we only call if there is an outstanding owner
// on the image (besides us).
- if (fCachedImage->getRefCnt() > 1) {
+ if (!fCachedImage->unique()) {
this->onCopyOnWrite(mode);
}
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698