Bug 1642629 - preallocate a few vectors in CompositeState. r=gw
Bug 1642629 - preallocate a few vectors in CompositeState. r=gw

These vectors are rebuilt once per frame. we can't recycle them because they are sent to the renderer. On a 4k screen for most sites the element counts are low enough that we can get away with preallocation from a pessimistic estimate, but high enough that reallocation happens a few times per frame and takes a small but visible portion of the profile.

Differential Revision: https://phabricator.services.mozilla.com/D79457

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/3d4463013cc1846de87680d44ebf1c8486e95fba

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender