SkJpegGainmapEncoder: Separate out MakeMPF function

Move XMP metadata to be part of the SkJpegEncoder::Options, instead of
having it be in the private options. This allows users to specify their
own XMP metadata.

Create the function SkJpegGainmapEncoder::MakeMPF. Make this a private
interface that users can call.

Change SkJpegGainmapEncoder::EncodeHDRGM use MakeMPF directly, rather
than reserving an MPF segment during encode, and then trying to locate
it while stitching the files together.

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