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>
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index ae34f90..16ec5ca 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -366,6 +366,11 @@
}
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 @@
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 @@
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.