Combine snapBackImage and snapSpecial

Previously, snapBackImage always made a copy since that is required for
its use in saveBehind(). Backdrop filters also used snapBackImage because
it relied on its subset SkIRect argument to avoid using the entire
layer as input to the backdrop filter. The regular snapSpecial() originally
did not take a subset at all. The GPU implementations of snapSpecial()
and snapBackImage() were very similar. This merges them into a single call
that takes a subset SkIRect and a boolean to control if the copy is required.

Only saveBehind() requires that the copy is made, due to how it bypasses
the regular copy-on-write behavior managed by SkCanvas and SkSurface. The
no-argument saveSpecial() is still provided, but it is defined to just snap
the bounds of the device.

Flutter noticed a fairly serious performance regression on iOS that went
back to this CL: https://github.com/google/skia/commit/08b260c27b519ac8fb17b3ff8ddccf4a2ac0e278. It was determined that the only significant change in
behavior that was active given their minimum working example was switching
from snapSpecial() to snapBackImage(). Hopefully moving to a snapSpecial that
takes a subset, but doesn't copy when there is a texture already available
will restore the performance.

Bug: skia:9283, https://github.com/flutter/flutter/issues/36352, https://github.com/flutter/flutter/issues/37541, https://github.com/flutter/flutter/issues/36064
Change-Id: I448f8886347a1e0f4da8f61279744bb9254f7752
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237127
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
9 files changed