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

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: 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/SkRecord.h
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h
index 96da69b12ef8c150729c07c8e846fab5452cb1dc..39f813791dc07168912723abdcdf900ff096e049 100644
--- a/src/core/SkRecord.h
+++ b/src/core/SkRecord.h
@@ -110,6 +110,10 @@ public:
return fRecords[i].set(this->allocCommand<T>());
}
+ size_t bytesUsed() const { return fAlloc.totalCapacity() +
mtklein 2014/11/17 20:19:32 fAlloc doesn't know how large it is any more, so y
+ fReserved * (sizeof(Record) + sizeof(Type8)) +
+ sizeof(SkRecord); }
+
private:
// Implementation notes!
//

Powered by Google App Engine
This is Rietveld 408576698