Move GrUniformDataManager setter logic into templates.

This code originally contained 16 extremely similar versions of the same
logic. (set1i, 1iv, 1f, 1fv, 2i, 2iv...)

Now the core logic has been boiled down to two (set, setv) templated
helper functions, one for array and one for non-array uniforms. Template
arguments fill in the minor variations between each type.

Structuring the logic in this way makes it easier to perform sweeping
changes as needed, and guarantees that the setters all work the same.

Change-Id: Iaa74d25c612b12ab26d7f32879c174bca6c850c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462099
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2 files changed