[graphite] Centralize handling of viewport/rtAdjust values

Adds a CollectIntrinsicUniforms() function to ContextUtils and moves
the SkSL for the intrinsic declarations to use the automatic
generation functions that accept an array of Uniform structs. In a
later CL, this will make it easy to add new uniforms w/o having to
modify each backend.

The backend CommandBuffer classes are updated to collect the
uniforms via a UniformManager and then write to the GPU in the manner
of their choosing, without needing to know the actual uniform
definition.

To make it so that the rtAdjust could be calculated in one place,
Caps now reports the NDC Y axis orientation. Also updated the
functions in CommandBuffer to take the viewport as an SkIRect. The
backend APIs technically take in arguments as floats but we want to
enforce that the viewport is pixel aligned.


Bug: b/364630448
Change-Id: I80efec36a61cb122d6bc55c5affd0a1d095bb8e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/891756
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
14 files changed