[graphite] Separate array and non-array write method variants

Redefined UniformManager and SkPipelineData array helpers to take a
SkSpan parameter where a span size of zero means "array with zero
elements". This helps remove the ambiguity of SkUniform's kNonArray
semantics in which a count of 1 can be mistaken for a single instance
when it means "single array element". Such a mistake can lead to
unintended errors when using std140 layout, which has special alignment
requirments for arrays.

Methods that write arrays are now named `writeArray` to remove overload
ambiguity. A `write` overload that operates on a SkUniform (using its
kNonArray count semantics) is also provided when the data source is a
SkUniform.

Change-Id: Icd24ddf880b6a6c61467f727267e36631b5d87ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/597916
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
5 files changed