[skif] Add non-strict asShader() to SkSpecialImage

Moves the replicate definitions of onAsShader() for Graphite and
Ganesh to the base class. The raster special image overrides it so
that it can subset the SkBitmap instead of going through
SkImageShader::MakeSubset(), which does not support bitmaps yet.

Adds a non-strict flag variant of asShader(), the variant that
does not take a tilemode. Right now, the only uses of asShader() are
the full parameter list, so the very simple signature is removed.

Under the assumption that the coordinates will not be outside of the
subset coords, a tilemode is unnecessary, hence the different
signature. I could be easily convinced to give it a different name if
there are any suggestions.

Bug: b/315351386
Change-Id: I61ae7428a68fa3d76b23a4082fd65797102d03d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/787918
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
4 files changed