encodedProfile can be null, so check for that
Bug: b/116608007 Change-Id: I622165d5c63f3a8548e763899128b3eb4b8459a6 Reviewed-on: https://skia-review.googlesource.com/157420 Auto-Submit: Leon Scroggins <scroggo@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
b3e48afc93
commit
227d4e1027
@ -177,15 +177,17 @@ sk_sp<SkColorSpace> SkAndroidCodec::computeOutputColorSpace(SkColorType outputCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
const skcms_ICCProfile* encodedProfile = fCodec->getEncodedInfo().profile();
|
const skcms_ICCProfile* encodedProfile = fCodec->getEncodedInfo().profile();
|
||||||
if (auto encodedSpace = SkColorSpace::Make(*encodedProfile)) {
|
if (encodedProfile) {
|
||||||
// Leave the pixels in the encoded color space. Color space conversion
|
if (auto encodedSpace = SkColorSpace::Make(*encodedProfile)) {
|
||||||
// will be handled after decode time.
|
// Leave the pixels in the encoded color space. Color space conversion
|
||||||
return encodedSpace;
|
// will be handled after decode time.
|
||||||
}
|
return encodedSpace;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_wide_gamut(*encodedProfile)) {
|
if (is_wide_gamut(*encodedProfile)) {
|
||||||
return SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
|
return SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
|
||||||
SkColorSpace::kDCIP3_D65_Gamut);
|
SkColorSpace::kDCIP3_D65_Gamut);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SkColorSpace::MakeSRGB();
|
return SkColorSpace::MakeSRGB();
|
||||||
|
Loading…
Reference in New Issue
Block a user