GrGLSLGP performs pre-order traversal to determine FP varyings.

The traversal examines sample usage during descent and tracks the last
matrix sample usage encountered. Each FP that uses coords directly gets
a varying inserted at the position of the last matrix sample usage
encountered.

Whether a starting perspective coord or perspective matrix is
encountered is also tracked on the stack, removing the need for a
FP flag to track this.

Bug: skia:12198
Change-Id: I9f6302c1c2b6619b67a0d6ee1697d6e971560a15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
6 files changed