SkJpegEncoder: Specify metadata segments explicitly

For ISO 21496-1 gainmaps, we're going to need to specify several more
metadata segments. These could be added as parameters to the public
SkJpegEncoder::Options, but that might be a bit much.

Instead, add an internal interface to SkJpegEncoderImpl whereby
one can specify the list metadata segments directly. Add the helper
functions SkJpegMetadataEncoder::AppendICC and AppendXMPStandard, and
change all callers to use this interface.

Bug: b/338342146
Change-Id: I531dccdc157d11b56a9ec97f0af91f4b938c88c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/853217
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
3 files changed