Index: src/core/SkPicture.cpp |
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp |
index 160dd4b420df044adc9e03d761db7307cbcba459..e2dbed1b8604443507fe532c6ef2948d1f66de37 100644 |
--- a/src/core/SkPicture.cpp |
+++ b/src/core/SkPicture.cpp |
@@ -564,6 +564,22 @@ bool SkPicture::hasText() const { |
return false; |
} |
+size_t SkPicture::bytesUsed() const { |
+ size_t byteCount = sizeof(SkPicture); |
+ |
+ // No support for old SkPicture backend |
+ if (!fRecord.get()) { |
+ return 0; |
+ } |
+ |
+ byteCount += fRecord->bytesUsed(); |
+ if (fBBH.get()) { |
+ byteCount += fBBH->bytesUsed(); |
+ } |
+ return byteCount; |
+} |
+ |
+ |
// fRecord OK |
bool SkPicture::willPlayBackBitmaps() const { |
if (fRecord.get()) { |