OLD | NEW |
(Empty) | |
| 1 #include "SkRecord.h" |
| 2 |
| 3 SkRecord::~SkRecord() { |
| 4 Destroyer destroyer; |
| 5 for (unsigned i = 0; i < this->count(); i++) { |
| 6 this->mutate<void>(i, destroyer); |
| 7 } |
| 8 } |
| 9 |
| 10 void SkRecord::grow() { |
| 11 SkASSERT(fCount == fReserved); |
| 12 fReserved = SkTMax<unsigned>(kFirstReserveCount, fReserved*2); |
| 13 fRecords.realloc(fReserved); |
| 14 fTypes.realloc(fReserved); |
| 15 } |
| 16 |
| 17 size_t SkRecord::bytesUsed() const { |
| 18 return fAlloc.approxBytesAllocated() + |
| 19 fReserved * (sizeof(Record) + sizeof(Type8)) + |
| 20 sizeof(SkRecord); |
| 21 } |
OLD | NEW |