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
Commit-Queue: Christopher Cameron <>
Reviewed-by: Brian Osman <>
Reviewed-by: Christopher Cameron <>
3 files changed