Using many small staging buffers is quite costly for performance, for
example when there are many small texture uploads (such as MotionMark's
"canvas bouncing clipped rects" test).
Instead, the new manager uses buffers of 32K minimum, and returns
suballocations of those.
For now, allocation is simply iterates through the list of staging
buffers and returns the first one with enough remaining space.
This is O(N) in the number of staging buffers, which should be
ok since there are fewer of them. (If it becomes a hot path, we
can optimize it later.)
This also subsumes the UBO-specific staging buffer, since that one
did much the same thing but did not reuse staging buffers.
Change-Id: I4fddee8bb0fc602c49fe552acc327a640bf6917b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279921
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>