Merge "Support CICPs in AImageDecoder" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e8499938be
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user