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

Side by Side Diff: src/core/SkRecord.cpp

Issue 756783002: SkRecord: outline methods that are not called O(N) times. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/core/SkRecord.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « src/core/SkRecord.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698