summaryrefslogtreecommitdiff
path: root/image/SkDataPixelRef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'image/SkDataPixelRef.cpp')
-rw-r--r--image/SkDataPixelRef.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/image/SkDataPixelRef.cpp b/image/SkDataPixelRef.cpp
index 05242433..7897bf93 100644
--- a/image/SkDataPixelRef.cpp
+++ b/image/SkDataPixelRef.cpp
@@ -27,6 +27,10 @@ void SkDataPixelRef::onUnlockPixels() {
// nothing to do
}
+size_t SkDataPixelRef::getAllocatedSizeInBytes() const {
+ return fData ? fData->size() : 0;
+}
+
void SkDataPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeDataAsByteArray(fData);