Merge "Support CICPs in AImageDecoder" into udc-dev am: e8499938be am: 3f81145f32 am: 64805f8702

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

Change-Id: I4e4c04c7920123ad38b2333844c060949dc6000e
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:45:03 +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.