SkJpegSourceMgr: Change getSubsetStream to getSubsetData

This function always returned an SkStream that was backed by an
SkData. Embrace this, rather than trying to pretend that it's not the
case, and return an SkData (along with a bool indicating if the SkData
is a copy versus an alias).

Make SkJpegGetMultiPictureGainmap now use this data directly, instead
of calling SkJpegExtractMultiPictureStreams. This allows for us to
do a more efficient scan of the MPF images (by creating the
SkJpegSegmentScanner directly, and having it stop at StartOfScan).

Remove SkJpegExtractMultiPictureStreams because it has no more
callers.

Bug: skia:14031
Change-Id: Ib8ea06e353a7bda5fd5f4fb732070819676cb1de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/643076
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
6 files changed