Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: dm/DMSrcSink.cpp

Issue 1635453002: Do not test images with alpha to 565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 8598de781c9bd48b16a716d006be24015ad4161d..057b6ae480c857460fa81683211eea349e6eaae3 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.";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698