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

Unified Diff: src/core/SkRTree.cpp

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 | « src/core/SkRTree.h ('k') | src/core/SkRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRTree.cpp
diff --git a/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index 6c7803119df757cc576ef2f4d6543b8b250910d7..13083be2125ff4d4d970cba0d74035ad06c0ca5f 100644
--- a/src/core/SkRTree.cpp
+++ b/src/core/SkRTree.cpp
@@ -170,3 +170,11 @@ void SkRTree::search(Node* node, const SkRect& query, SkTDArray<unsigned>* resul
}
}
}
+
+size_t SkRTree::bytesUsed() const {
+ size_t byteCount = sizeof(SkRTree);
+
+ byteCount += fNodes.reserved() * sizeof(Node);
+
+ return byteCount;
+}
« no previous file with comments | « src/core/SkRTree.h ('k') | src/core/SkRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698