Merge "Support CICPs in AImageDecoder" into udc-dev am: e8499938be

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23096136

Change-Id: I257714b947309abc74e59b5b09c3564f2bc216c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-05-11 14:07:25 +00:00
committed by Automerger Merge Worker

View File

@@ -51,6 +51,9 @@ using namespace android;
sk_sp<SkColorSpace> ImageDecoder::getDefaultColorSpace() const {
const skcms_ICCProfile* encodedProfile = mCodec->getICCProfile();
if (encodedProfile) {
if (encodedProfile->has_CICP) {
return mCodec->computeOutputColorSpace(kN32_SkColorType);
}
// If the profile maps directly to an SkColorSpace, that SkColorSpace
// will be returned. Otherwise, nullptr will be returned. In either
// case, using this SkColorSpace results in doing no color correction.