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

Unified Diff: src/core/SkRecord.h

Issue 490253003: Implement SkPicture::bytesUsed() for SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix minor edit error in SkTileGrid::bytesUsed 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
Index: src/core/SkRecord.h
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h
index 6019e0340683c9f2077b04c3868ace677c0e2687..4024004392e5d6a31d44d414f2b0bf787c4e180d 100644
--- a/src/core/SkRecord.h
+++ b/src/core/SkRecord.h
@@ -113,6 +113,10 @@ public:
return fRecords[i].set(this->allocCommand<T>());
}
+ size_t bytesUsed() const { return fAlloc.approxBytesAllocated() +
+ fReserved * (sizeof(Record) + sizeof(Type8)) +
+ sizeof(SkRecord); }
+
private:
// Implementation notes!
//
« src/core/SkRTree.h ('K') | « src/core/SkRTree.cpp ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698