diff options
Diffstat (limited to 'src/core/SkPictureRecorder.cpp')
-rw-r--r-- | src/core/SkPictureRecorder.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 6c23cc075e..a37cd4826c 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -83,7 +83,12 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag fCullRect = bbhBound; } - return sk_make_sp<SkBigPicture>(fCullRect, fRecord.release(), pictList, fBBH.release()); + size_t subPictureBytes = fRecorder->approxBytesUsedBySubPictures(); + for (int i = 0; pictList && i < pictList->count(); i++) { + subPictureBytes += pictList->begin()[i]->approximateBytesUsed(); + } + return sk_make_sp<SkBigPicture>(fCullRect, fRecord.release(), pictList, fBBH.release(), + subPictureBytes); } sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPictureWithCull(const SkRect& cullRect, |