Index: src/core/SkRecord.h |
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h |
index 6019e0340683c9f2077b04c3868ace677c0e2687..357f4fb16b562b169b4945f61feb8af2618bf50f 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! |
// |