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

Unified Diff: src/core/SkRecord.h

Issue 741793002: Add SkNVRefCnt, prune down SkPicture's size (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak name Created 6 years, 1 month 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
« no previous file with comments | « include/core/SkRefCnt.h ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecord.h
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h
index 357f4fb16b562b169b4945f61feb8af2618bf50f..403110d38549fda36391e145b80e9ce397ebb927 100644
--- a/src/core/SkRecord.h
+++ b/src/core/SkRecord.h
@@ -231,12 +231,15 @@ private:
// fRecords and fTypes need to be data structures that can append fixed length data, and need to
// support efficient random access and forward iteration. (They don't need to be contiguous.)
- SkVarAlloc fAlloc;
- SkAutoTMalloc<Record> fRecords;
- SkAutoTMalloc<Type8> fTypes;
// fCount and fReserved measure both fRecords and fTypes, which always grow in lock step.
unsigned fCount;
unsigned fReserved;
+ SkAutoTMalloc<Record> fRecords;
+ SkAutoTMalloc<Type8> fTypes;
+ SkVarAlloc fAlloc;
+ // Strangely the order of these fields matters. If the unsigneds don't go first we're 56 bytes.
+ // tomhudson and mtklein have no idea why.
};
+SK_COMPILE_ASSERT(sizeof(SkRecord) <= 48, SkRecordSize);
#endif//SkRecord_DEFINED
« no previous file with comments | « include/core/SkRefCnt.h ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698