| Index: src/utils/SkPictureUtils.cpp
|
| diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a8a251c92753c7d9f599475b71ba99dfc896a8c7
|
| --- /dev/null
|
| +++ b/src/utils/SkPictureUtils.cpp
|
| @@ -0,0 +1,25 @@
|
| +/*
|
| + * Copyright 2012 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#include "SkBBoxHierarchy.h"
|
| +#include "SkCanvas.h"
|
| +#include "SkData.h"
|
| +#include "SkPictureUtils.h"
|
| +#include "SkRecord.h"
|
| +#include "SkShader.h"
|
| +
|
| +size_t SkPictureUtils::ApproximateBytesUsed(const SkPicture* pict) {
|
| + size_t byteCount = sizeof(*pict);
|
| +
|
| + byteCount += pict->fRecord->bytesUsed();
|
| + if (pict->fBBH.get()) {
|
| + byteCount += pict->fBBH->bytesUsed();
|
| + }
|
| + byteCount += pict->fApproxBytesUsedBySubPictures;
|
| +
|
| + return byteCount;
|
| +}
|
|
|