[graphite] Clean up legacy pre-local matrix system for local coord hack

Most render steps do not yet emit local coordinates. To get around this, we had implemented a workaround whereby the first uniform in gradient and image shaders was guaranteed to be a prelocal matrix. Whenever local coordinates were needed (needsLocalCoords), we multiplied the supplied device coordinates by the prelocal matrix in order to obtain the local coordinates. This operation would be repeated many times which is not efficient.

As we migrate render steps to writing out local coordinates when needed, we want to remove this workaround and have gradient / image shaders take in local coords directly and eliminate the need for a prelocal matrix.

For now, I have kept the device-to-local matrix within Paint Params until the render steps can be safely converted to using this new method.

I tested this with gradients used for drawVertices (since vertices render steps *do* emit local coordinates directly), and the functionality looks visually identical to the output on the main branch where we use the local matrix hack.

Bug: b/241403212
Change-Id: Iedee0c397164ff34d2f12f4d3c4a0ca2c9e72b15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/573077
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
17 files changed