Index: src/core/SkRecord.h |
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h |
index 6019e0340683c9f2077b04c3868ace677c0e2687..a70c050a62a7db8b598af95bf84322f3d87131be 100644 |
--- a/src/core/SkRecord.h |
+++ b/src/core/SkRecord.h |
@@ -113,6 +113,12 @@ public: |
return fRecords[i].set(this->allocCommand<T>()); |
} |
+ // Does not return the bytes in any pointers embedded in the Records; callers |
+ // need to iterate with a visitor to measure those they care for. |
+ size_t bytesUsed() const { return fAlloc.approxBytesAllocated() + |
+ fReserved * (sizeof(Record) + sizeof(Type8)) + |
+ sizeof(SkRecord); } |
+ |
private: |
// Implementation notes! |
// |
@@ -233,4 +239,4 @@ private: |
unsigned fReserved; |
}; |
-#endif//SkRecord_DEFINED |
+#endif //SkRecord_DEFINED |
mtklein
2014/11/18 21:38:32
oh snap
tomhudson
2014/11/18 21:49:37
Sigh, I guess there is no standard spec here? SkCa
mtklein
2014/11/18 21:54:35
Goodness, why would we ever have a standard spec f
|