aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkPictureUtils.h
diff options
context:
space:
mode:
authorGravatar tomhudson <tomhudson@chromium.org>2014-11-19 10:41:14 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-19 10:41:14 -0800
commit158fcaa031d105dc999d9813fee8927db56a871c (patch)
tree8a1415b2822e67cad2e31e2957cac735415f7c03 /include/utils/SkPictureUtils.h
parent72f92acd47a884b9a1cc961a822a2d4e586b54c1 (diff)
Implement SkPicture::bytesUsed() for SkRecord backend
BUG=chromium:230419 R=mtklein@google.com,reed@google.com Review URL: https://codereview.chromium.org/490253003
Diffstat (limited to 'include/utils/SkPictureUtils.h')
-rw-r--r--include/utils/SkPictureUtils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/utils/SkPictureUtils.h b/include/utils/SkPictureUtils.h
index c35e1c7409..9bdf6f69a1 100644
--- a/include/utils/SkPictureUtils.h
+++ b/include/utils/SkPictureUtils.h
@@ -78,6 +78,14 @@ public:
* and rect information.
*/
static void GatherPixelRefsAndRects(SkPicture* pict, SkPixelRefContainer* prCont);
+
+ /**
+ * How many bytes are allocated to hold the SkPicture.
+ * Includes operations, parameters, bounding data, deletion listeners;
+ * includes nested SkPictures, but does not include large objects that
+ * SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps).
+ */
+ static size_t ApproximateBytesUsed(const SkPicture* pict);
};
#endif