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

Unified Diff: dm/DMSrcSink.cpp

Issue 1287863004: Test scaling for small images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed comment Created 5 years, 4 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 | include/codec/SkCodec.h » ('j') | 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 9826f978224d74dfc5f543164fc84bb0121f7a02..f766b49c79395acceaba2dbff4cec8794e46f43f 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -120,6 +120,12 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
if (size == decodeInfo.dimensions() && 1.0f != fScale) {
return Error::Nonfatal("Test without scaling is uninteresting.");
}
+
+ // Visually inspecting very small output images is not necessary. We will
+ // cover these cases in unit testing.
+ if ((size.width() <= 10 || size.height() <= 10) && 1.0f != fScale) {
+ return Error::Nonfatal("Scaling very small images is uninteresting.");
+ }
decodeInfo = decodeInfo.makeWH(size.width(), size.height());
// Construct a color table for the decode if necessary
« no previous file with comments | « no previous file | include/codec/SkCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698