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
This commit is contained in:
parent
f8dc9df9ab
commit
12e2f50569
@ -501,7 +501,6 @@ static void push_codec_srcs(Path path) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
nativeModes.push_back(CodecSrc::kScanline_Mode);
|
nativeModes.push_back(CodecSrc::kScanline_Mode);
|
||||||
nativeModes.push_back(CodecSrc::kStripe_Mode);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,9 +484,8 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
|
|||||||
// This mode was designed to test the new skip scanlines API in libjpeg-turbo.
|
// 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
|
// 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.
|
// to run this test for image types that do not have this scanline ordering.
|
||||||
if (SkCodec::kTopDown_SkScanlineOrder != codec->getScanlineOrder()) {
|
// We only run this on Jpeg, which is always kTopDown.
|
||||||
return Error::Nonfatal("kStripe test is only interesting for kTopDown codecs.");
|
SkASSERT(SkCodec::kTopDown_SkScanlineOrder == codec->getScanlineOrder());
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < numStripes; i += 2) {
|
for (int i = 0; i < numStripes; i += 2) {
|
||||||
// Skip a stripe
|
// Skip a stripe
|
||||||
|
Loading…
Reference in New Issue
Block a user