diff options
author | 2014-11-19 10:41:14 -0800 | |
---|---|---|
committer | 2014-11-19 10:41:14 -0800 | |
commit | 158fcaa031d105dc999d9813fee8927db56a871c (patch) | |
tree | 8a1415b2822e67cad2e31e2957cac735415f7c03 /include/utils/SkPictureUtils.h | |
parent | 72f92acd47a884b9a1cc961a822a2d4e586b54c1 (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.h | 8 |
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 |