Fix the preallocated size of string arrays in GrGLSLShaderBuilder

Fragment shaders typically have at least three (?) processors, and from
histogramming GMs and SKPs, the largest number is six. Even our vertex
shaders (half of all shaders being built) have one, and this code had an
off-by-one in the preallocation size: We set aside enough space for
kCode (10) elements, then immediately pushed 11 (i <= kCode).

This change should cut down on three heap allocations for every shader.

Bug: skia:
Change-Id: Iaa2a38b9ff82eb5b81935f9f1d1d96a9bc8aad90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201463
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
1 file changed