Merge "Support CICPs in AImageDecoder" into udc-dev am: e8499938be am: 3f81145f32
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23096136 Change-Id: I3575fbd4d965ac3b55f00215d380c95f53699a9f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user