Rearrange SkRecord with small N in mind
authormtklein <mtklein@chromium.org>
Thu, 9 Apr 2015 14:46:41 +0000 (07:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Apr 2015 14:46:41 +0000 (07:46 -0700)
commit29b1afc169576cf5e708e46b74313b5666e66249
tree95b111cf1f46fff32ad9889b34580488a810cd2d
parent7178a3b5957faed3998498f8f6092ce9e06f9a03
Rearrange SkRecord with small N in mind

This rearranges the record pointers and types so they can go in a single array, then preallocates some space for them and for the SkVarAlloc.

picture_overhead_draw bench drops from ~1000ns to 500-600ns, with no effect on picture_overhead_nodraw.

I don't see any significant effect on large picture recording times from our .skps.

BUG=chromium:470553

Committed: https://skia.googlesource.com/skia/+/e2dd9408cd711777afaa9410427fb0d761ab004a

Review URL: https://codereview.chromium.org/1061783002
src/core/SkRecord.cpp
src/core/SkRecord.h
src/core/SkVarAlloc.cpp
src/core/SkVarAlloc.h
tests/PictureTest.cpp