Bring back SkNoPixelsDevice::resetForNextPicture

Always creating an SkNoPixelsDevice causes slight, but consistent
performance regressions in Android's recording canvases. In their case
the device doesn't actually change size so we can safely support
resetForNextPicture() without relying on private/backdoor functionality
in SkDevice and restore the original behavior.

Now resetForNextPicture() returns a boolean in the event that the
bounds are differently sized from before. In that case, SkCanvas will
create a new SkNoPixelsDevice.

Bug: b/299728639
Change-Id: I3dcdab3778499fff8c69d07cec8481f3257d9ebf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/755237
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
3 files changed