aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkVarAlloc.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-11-20 09:18:31 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-20 09:18:32 -0800
commit08d1fccf6eeec0a9fd5421e59e4d05daccf6e339 (patch)
tree4b4e6e07b4f4371a443d057591665a5ac0bcbdd3 /src/core/SkVarAlloc.h
parentcdeeb095a629b0db9f0ddff09516f2b78255c047 (diff)
Add SkNVRefCnt, prune down SkPicture's size
SkNVRefCnt is a variant of SkRefCnt that's Not Virtual, so weighs 4 bytes instead of 8 or 16. There's only benefit to doing this if the deriving class does not otherwise need a vtable, e.g. SkPicture. I've stripped out some cruft from SkPicture, rearranged fields to pack tightly, and added compile asserts for the sizes of SkPicture, SkRecord, and SkVarAlloc. BUG=skia:3144 Review URL: https://codereview.chromium.org/741793002
Diffstat (limited to 'src/core/SkVarAlloc.h')
-rw-r--r--src/core/SkVarAlloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkVarAlloc.h b/src/core/SkVarAlloc.h
index 9eac658828..2e8f19c8fe 100644
--- a/src/core/SkVarAlloc.h
+++ b/src/core/SkVarAlloc.h
@@ -37,5 +37,6 @@ private:
struct Block;
Block* fBlock;
};
+SK_COMPILE_ASSERT(sizeof(SkVarAlloc) <= 24, SkVarAllocSize);
#endif//SkVarAlloc_DEFINED