Add skhdr::Agtm interface

Add a semi-public skhdr::Agtm interface for AGTM metdata.

Rename the internal skhdr::Agtm structure to skhdr::AgtmImpl, and have
it implement the abstract public interface.

Add the function AgtmImpl::populateGainCurvesXYM which populates the
SkImage used for the gain curves. This is now done at creation time,
instead of being done lazily.

Add the functions skhdr::Metadata::get/setAgtm. These functions take
serialized AGTM metadata. The actual AGTM metadata will most often flow
through the full display pipeline in its serialized form (perhaps going
all the way to the OS without ever being deserialized).

Add the function skhdr::AgtmImpl::toString, because it is needed for the
function skhdr::Metadata::toString.

Bug: skia:456675139
Change-Id: Ic41ec122698a9fa57336f8dc7324fa6d2909dc7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1110357
Owners-Override: Kaylee Lubick <kjlubick@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Kaylee Lubick <kjlubick@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
9 files changed