Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: include/utils/SkPictureUtils.h

Issue 490253003: Implement SkPicture::bytesUsed() for SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More tweaks for object size Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBBoxHierarchy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkPictureUtils.h
diff --git a/include/utils/SkPictureUtils.h b/include/utils/SkPictureUtils.h
index c35e1c74090996c8daf1f71f96b4966ef15f7616..9bdf6f69a143041a0d7d8d1d18751b9600ae9a04 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBBoxHierarchy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698