Minimize renderstate changes and vertex buffer rebinding.
We were resetting the vertex buffer state after every draw, even if
the vertex buffer hasn't changed. This addresses that. It also sets
certain renderstate at renderencoder creation -- again, rather than
at every draw.
Bug: skia:8243
Change-Id: I053e150c289c14b60385f555a8b4b771a131ea06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
4 files changed