Add OptFlags support to GrSkSLFP

Constant output for constant input is determined automatically from the
SkSL. The other two flags are trickier, so we just let the caller
specify them. This will be a key part of migrating .fp files to runtime
FPs.

Restored the preserves-opaque-input flag for color FPs when the color is
opaque (an optimization that was lost when this was initially converted
to a runtime FP).

Change-Id: I6d649ebc23257e2514f42373e51e22d8a65109a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419161
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
7 files changed