| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2012 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #include "SkBBoxHierarchy.h" | |
| 9 #include "SkCanvas.h" | |
| 10 #include "SkData.h" | |
| 11 #include "SkPictureUtils.h" | |
| 12 #include "SkRecord.h" | |
| 13 #include "SkShader.h" | |
| 14 | |
| 15 size_t SkPictureUtils::ApproximateBytesUsed(const SkPicture* pict) { | |
| 16 size_t byteCount = sizeof(*pict); | |
| 17 | |
| 18 byteCount += pict->fRecord->bytesUsed(); | |
| 19 if (pict->fBBH.get()) { | |
| 20 byteCount += pict->fBBH->bytesUsed(); | |
| 21 } | |
| 22 byteCount += pict->fApproxBytesUsedBySubPictures; | |
| 23 | |
| 24 return byteCount; | |
| 25 } | |
| OLD | NEW |