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

Unified Diff: include/core/SkTextBlob.h

Issue 737093002: Stop overloading internal_dispose in SkTextBlob and SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ARGGGGGGHHHH Created 6 years, 1 month 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 | « include/core/SkData.h ('k') | src/core/SkData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTextBlob.h
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index 8ee1d1919628b10e0d3f3ca6085a02ad619a68b2..334cfb98c4595d2d51844e55c82880b89de9a34e 100644
--- a/include/core/SkTextBlob.h
+++ b/include/core/SkTextBlob.h
@@ -79,7 +79,15 @@ private:
SkTextBlob(int runCount, const SkRect& bounds);
virtual ~SkTextBlob();
- virtual void internal_dispose() const SK_OVERRIDE;
+
+ // Memory for objects of this class is created with sk_malloc rather than operator new and must
+ // be freed with sk_free.
+ void operator delete(void* p) { sk_free(p); }
+ void* operator new(size_t) {
+ SkFAIL("All blobs are created by placement new.");
+ return sk_malloc_throw(0);
+ }
+ void* operator new(size_t, void* p) { return p; }
static unsigned ScalarsPerGlyph(GlyphPositioning pos);
« no previous file with comments | « include/core/SkData.h ('k') | src/core/SkData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698