aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMallocPixelRef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkMallocPixelRef.h')
-rw-r--r--include/core/SkMallocPixelRef.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h
index 2241a513e7..100a15d90a 100644
--- a/include/core/SkMallocPixelRef.h
+++ b/include/core/SkMallocPixelRef.h
@@ -24,8 +24,6 @@ public:
SkMallocPixelRef(void* addr, size_t size, SkColorTable* ctable, bool ownPixels = true);
virtual ~SkMallocPixelRef();
- //! Return the allocation size for the pixels
- size_t getSize() const { return fSize; }
void* getAddr() const { return fStorage; }
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef)
@@ -38,6 +36,9 @@ protected:
SkMallocPixelRef(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+ // Returns the allocation size for the pixels
+ virtual size_t getAllocatedSizeInBytes() const SK_OVERRIDE { return fSize; }
+
private:
void* fStorage;
size_t fSize;