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

Unified Diff: src/core/SkTileGrid.cpp

Issue 490253003: Implement SkPicture::bytesUsed() for SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move to SkPictureUtils, start unit test Created 6 years, 4 months 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
Index: src/core/SkTileGrid.cpp
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp
index 17102f50e2f75929f9e63cc71f8c55e33a5c0de1..664314d1d8063d3786c374eed2a181cfa9fcee86 100644
--- a/src/core/SkTileGrid.cpp
+++ b/src/core/SkTileGrid.cpp
@@ -164,3 +164,14 @@ void SkTileGrid::rewindInserts() {
}
}
}
+
+size_t SkTileGrid::bytesUsed() const {
+ size_t byteCount = sizeof(SkTileGrid);
+
+ for (size_t i = 0; i < fCount; i++) {
+ byteCount = fTiles[i].reserved() * sizeof(Entry);
mtklein 2014/11/17 20:19:32 This is going to need an update too.
+ }
+
+ return byteCount;
+}
+

Powered by Google App Engine
This is Rietveld 408576698