Disable unpremul f16 image tests
Testing premul f16 is enough test coverage, and we aren't doing this correctly right now anyways (the drawing code assumes a premul bitmap, we would need to premultiply after the unpremul decode). BUG=skia: Change-Id: I798f56db67faadd0348974453a05cd726b9a509c Reviewed-on: https://skia-review.googlesource.com/8020 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
parent
e0b048cd1d
commit
ea518f0a7e
@ -366,6 +366,11 @@ static bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType
|
||||
}
|
||||
|
||||
if (kRGBA_F16_SkColorType == canvasColorType) {
|
||||
if (kUnpremul_SkAlphaType == dstAlphaType) {
|
||||
// Testing kPremul is enough for adequate coverage of F16 decoding.
|
||||
return false;
|
||||
}
|
||||
|
||||
sk_sp<SkColorSpace> linearSpace =
|
||||
as_CSB(decodeInfo->colorSpace())->makeLinearGamma();
|
||||
*decodeInfo = decodeInfo->makeColorSpace(std::move(linearSpace));
|
||||
@ -404,7 +409,7 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
|
||||
SkImageInfo decodeInfo = codec->getInfo();
|
||||
if (!get_decode_info(&decodeInfo, canvas->imageInfo().colorType(), fDstColorType,
|
||||
fDstAlphaType)) {
|
||||
return Error::Nonfatal("Testing non-565 to 565 is uninteresting.");
|
||||
return Error::Nonfatal("Skipping uninteresting test.");
|
||||
}
|
||||
|
||||
// Try to scale the image if it is desired
|
||||
@ -799,7 +804,7 @@ Error AndroidCodecSrc::draw(SkCanvas* canvas) const {
|
||||
SkImageInfo decodeInfo = codec->getInfo();
|
||||
if (!get_decode_info(&decodeInfo, canvas->imageInfo().colorType(), fDstColorType,
|
||||
fDstAlphaType)) {
|
||||
return Error::Nonfatal("Testing non-565 to 565 is uninteresting.");
|
||||
return Error::Nonfatal("Skipping uninteresting test.");
|
||||
}
|
||||
|
||||
// Scale the image if it is desired.
|
||||
|
Loading…
Reference in New Issue
Block a user