aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTextBlob.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-20 08:02:46 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-20 08:02:46 -0800
commit072803144a623f1a59eb73ca5f3ddf45222b5e06 (patch)
treeea7fb517ab3948a6d60f315ee92b6ec92f88b49a /include/core/SkTextBlob.h
parent7cc1a34fbf5506e3a9e6834f0dcd988aa7c94084 (diff)
Stop overloading internal_dispose in SkTextBlob and SkData
Diffstat (limited to 'include/core/SkTextBlob.h')
-rw-r--r--include/core/SkTextBlob.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index 8ee1d19196..334cfb98c4 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);