diff options
author | msarett <msarett@google.com> | 2016-01-25 08:20:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-25 08:20:55 -0800 |
commit | d03b7ae1e273e871d951c94fd9626d62acee9379 (patch) | |
tree | d5b2c32b3913f680c1747cba58c129164951578d /dm | |
parent | c721196067b78226b97709998a96e0f037d8fb64 (diff) |
Do not test images with alpha to 565
This should handle the untriaged images in Gold.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1635453002
Review URL: https://codereview.chromium.org/1635453002
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DMSrcSink.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 8598de781c..057b6ae480 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -288,6 +288,11 @@ Error test_gen(SkCanvas* canvas, SkData* data) { // Currently, we will avoid creating a CodecSrc for this case (see DM.cpp). SkASSERT(kGray_8_SkColorType != gen->getInfo().colorType()); + if (kOpaque_SkAlphaType != gen->getInfo().alphaType() && + kRGB_565_SkColorType == canvas->imageInfo().colorType()) { + return Error::Nonfatal("Skip testing non-opaque images to 565."); + } + SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen, nullptr)); if (!image) { return "Could not create image from codec image generator."; |