SkWriteICCProfile: Write CICP data for PQ and HLG color spaces

In icc_from_color_space, do not early-out for non-sRGBish spaces.

Add functions to get_cicp_primaries and get_cicp_trfn to translate
from skcms_Matrix3x3 and skcms_TransferFunction to their enum values.

Add the function write_cicp_tag to create the CICP tag using these
enum values.

There was significant overlay between get_color_profile_description
and get_cicp_primaries and get_cicp_trfn. Refactor the code to
generate the description tag to use these constants. Merge the
code for the cprt (copyright) and desc (description) tags into
a single write_text_tag function.

Bug: 1366315
Change-Id: I75f633c8ce3ce48ee0bc55f3223fb49cd2021540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/585076
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
3 files changed