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
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 153695b..2fe6e47 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1119,7 +1119,7 @@
// Protect against any unintentional bloat.
size_t approxUsed = SkPictureUtils::ApproximateBytesUsed(empty.get());
- REPORTER_ASSERT(reporter, approxUsed <= 136);
+ REPORTER_ASSERT(reporter, approxUsed <= 416);
// Sanity check of nested SkPictures.
SkPictureRecorder r2;