diff options
Diffstat (limited to 'include/core/SkMallocPixelRef.h')
-rw-r--r-- | include/core/SkMallocPixelRef.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h index 1c36b74..7022ba2 100644 --- a/include/core/SkMallocPixelRef.h +++ b/include/core/SkMallocPixelRef.h @@ -25,13 +25,15 @@ class SkMallocPixelRef : public SkPixelRef { public: /** Allocate the specified buffer for pixels. The memory is freed when the - last owner of this pixelref is gone. + last owner of this pixelref is gone. If addr is NULL, sk_malloc_throw() + is called to allocate it. */ SkMallocPixelRef(void* addr, size_t size, SkColorTable* ctable); virtual ~SkMallocPixelRef(); //! Return the allocation size for the pixels size_t getSize() const { return fSize; } + void* getAddr() const { return fStorage; } // overrides from SkPixelRef virtual void flatten(SkFlattenableWriteBuffer&) const; @@ -58,4 +60,5 @@ private: typedef SkPixelRef INHERITED; }; + #endif |