Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 953a160f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

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