SkJpegXmp: Consolidate XMP parsing in SkJpegXmp

Move the static helper functions for parsing XMP for gainmap
information (namely XmpIsHDRGainMap, SkJpegGetJpegRGainmapParseXMP,
and SkJpegGetHDRGMGainmapInfo) to be members of SkJpegXmp. Also move
the various XMP parsing helpers into SkJpegXmp.cpp.

Update SkJpegGetMultiPictureGainmap to use SkJpegXmp, to allow it
to use the above functions. SkJpegSourceMgr::copyParameters, which
was used to look for just one XMP segment to
SkJpegSourceMgr::getSegmentParameters, which is used to populate the
list of APP1 segments' parameters that is used by SkJpegXmp::Make.

There is nothing Jpeg-specific about SkJpegXmp. At some point, when
it is used by more codecs, it should be renamed to SkCodecXmp.

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