aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@chromium.org>2016-05-16 09:04:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-16 09:04:18 -0700
commit12e2f505696f283cc07ce8242e814263dd9e0950 (patch)
treeeec25bc92361a3068db1fd866ff9c5903b2f0bff /dm
parentf8dc9df9ab0a90b74d56df9583752a1c38ee20f4 (diff)
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
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp1
-rw-r--r--dm/DMSrcSink.cpp5
2 files changed, 2 insertions, 4 deletions
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