SkJpegGainmapEncoder: Encode HDRGM using combined MPF and GContainer
Update SkJpegGainmapEncoder::EncodeHDRGM to build an MPF file. To do
this, encode the base image with a placeholder MPF segment. Then,
once we know the length of the encoded image, find where that MPF
segment was, and overwrite it with the correct values.
Also include GContainer XMP metadata.
In SkJpegEncoder::Make, skip of null segments (it's easier to skip
there than elsewhere).
Bug: skia:14031
Change-Id: I6b140de03402be0ffa1b28abeb219afe55e0cda0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/644016
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
7 files changed