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

Unified Diff: include/core/SkData.h

Issue 15675025: One allocation for an SkData which makes a copy. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Use 'this' instead of function as special case trigger. 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
« no previous file with comments | « no previous file | include/core/SkRefCnt.h » ('j') | src/core/SkData.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkData.h
===================================================================
--- include/core/SkData.h (revision 9507)
+++ include/core/SkData.h (working copy)
@@ -133,12 +133,15 @@
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
private:
- ReleaseProc fReleaseProc;
- void* fReleaseProcContext;
+ /** Called when the ref count goes to zero. */
+ virtual void internal_dispose() const SK_OVERRIDE;
+
+ size_t const fSize;
+ void const * const fPtr;
+
+ ReleaseProc const fReleaseProc;
+ void * const fReleaseProcContext;
- const void* fPtr;
- size_t fSize;
-
SkData(const void* ptr, size_t size, ReleaseProc, void* context);
virtual ~SkData();
« no previous file with comments | « no previous file | include/core/SkRefCnt.h » ('j') | src/core/SkData.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698