From 12e2f505696f283cc07ce8242e814263dd9e0950 Mon Sep 17 00:00:00 2001 From: scroggo Date: Mon, 16 May 2016 09:04:18 -0700 Subject: Only run kStripe_Mode on JPEGs It was designed to test code in libjpeg-turbo. Skipping scanlines is tested more generally in other tests. BUG=skia:5307 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978013002 Review-Url: https://codereview.chromium.org/1978013002 --- dm/DM.cpp | 1 - dm/DMSrcSink.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'dm') diff --git a/dm/DM.cpp b/dm/DM.cpp index b8aed5f166..4f03befcd1 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -501,7 +501,6 @@ static void push_codec_srcs(Path path) { break; default: nativeModes.push_back(CodecSrc::kScanline_Mode); - nativeModes.push_back(CodecSrc::kStripe_Mode); break; } diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 69c1e0ba48..a98ba41d18 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -484,9 +484,8 @@ Error CodecSrc::draw(SkCanvas* canvas) const { // This mode was designed to test the new skip scanlines API in libjpeg-turbo. // Jpegs have kTopDown_SkScanlineOrder, and at this time, it is not interesting // to run this test for image types that do not have this scanline ordering. - if (SkCodec::kTopDown_SkScanlineOrder != codec->getScanlineOrder()) { - return Error::Nonfatal("kStripe test is only interesting for kTopDown codecs."); - } + // We only run this on Jpeg, which is always kTopDown. + SkASSERT(SkCodec::kTopDown_SkScanlineOrder == codec->getScanlineOrder()); for (int i = 0; i < numStripes; i += 2) { // Skip a stripe -- cgit v1.2.3