Avoid overallocating RunInfo glyph vector

The ShapeResult::RunInfo glyph_data vector has an effective maximum size
of (1 << 15) - 1 yet we always allocate up to the total number of glyphs
even if that exceeds the limit and multiple runs are needed to represent
the slice or shape result. This patch limits glyph allocation to the max
number supported, saving time on memory allocation.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6fc30d2bf77d8967126f7cb563107f5ac8006adc
Reviewed-on: https://chromium-review.googlesource.com/1150296
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578058}
2 files changed