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

Unified Diff: include/core/SkRefCnt.h

Issue 15675025: One allocation for an SkData which makes a copy. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Clean Created 7 years, 6 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
Index: include/core/SkRefCnt.h
===================================================================
--- include/core/SkRefCnt.h (revision 9702)
+++ include/core/SkRefCnt.h (working copy)
@@ -71,16 +71,6 @@
SkASSERT(fRefCnt > 0);
}
- /**
- * Alias for ref(), for compatibility with scoped_refptr.
- */
- void AddRef() { this->ref(); }
-
- /**
- * Alias for unref(), for compatibility with scoped_refptr.
- */
- void Release() { this->unref(); }
-
protected:
/**
* Allow subclasses to call this if they've overridden internal_dispose
@@ -104,9 +94,10 @@
SkDELETE(this);
}
+ // The following friends are those which override internal_dispose()
+ // and conditionally call SkRefCnt::internal_dispose().
+ friend class GrTexture;
friend class SkWeakRefCnt;
- friend class GrTexture; // to allow GrTexture's internal_dispose to
- // call SkRefCnt's & directly set fRefCnt (to 1)
mutable int32_t fRefCnt;

Powered by Google App Engine
This is Rietveld 408576698