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 |