Consolidate SkImage::makeWithFilter implementations

SkImage::makeWithFilter is now non-virtual. The helper function
SkImage_Base::filterSpecialImage has been removed and its logic folded
into makeWithFilter.

SkImage_Base adds a new virtual, onCreateFilterContext, to create
a skif::Context. Since Context has a makeImage() function that
delegates to each backend's SkSpcialImage factory, that is sufficient
for the single makeWithFilter function to convert 'this' into an
appropriate SkSpecialImage. This will make implementing makeWithFilter
for Graphite trivial, once the public SkImage API has a way to take
a GrRecordingContext* or a Recorder* in the same parameter.

Context::makeImage ends up calling the same factories that the old
subclass overrides were calling but we don't have to duplicate the rest
of the surrounding logic.

To get around a chicken-egg problem, the ContextInfo is created w/o
a source image and then filled in using the returned Context.

Bug: skia:9282
Bug: b/725196
Change-Id: Ie9366ecac6cd6f70b95c46881303051332b78e3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/725699
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
10 files changed