Use scaled blits in SurfaceContext::rescale()

While the motivation for this work (scaling backdrop filters copy-out)
isn't handled yet, scaled blits can still be used for 1-off rescale
calls or the decimation that happens for large blurs in regular image
filtering. This would mean that a sufficiently simple rescale() call
could be turned into N glBlitFramebuffer calls if rescaling would have
been N bilinear draws instead.

The main benefit of glBlitFramebuffer and scaling is it can be used
when the surface isn't texturable, and rescaleInto() has been updated
to take advantage of that. Most current use cases of rescaleInto()
probably already are texturable, but that will change in my next CL.

Bug: b/197774543
Change-Id: I25f63bb04be4d426d52f96eb94fde2ed451cecf4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/582499
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2 files changed