Simplify DisplayItemList initial capacity
Change ContiguousContainer to allocate the initial buffer when adding the first element, so that the initial capacity can be passed as a parameter of the constructor. Remove ShrinkToFit() because it does nothing as we don't remove display items (and we don't have other users of ContiguousContainer). It was needed when we had paired display items and we may remove display items. Bug: 1130242 Change-Id: I263fc95db20b1571739fcbd6bb0ce13b393416f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446480Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#813826}
Showing
This diff is collapsed.
Please register or sign in to comment