diff options
author | Brian Osman <brianosman@google.com> | 2018-04-06 15:28:23 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-06 19:59:44 +0000 |
commit | ea176c608f6ce4f4420e129e30e12299e51c8de8 (patch) | |
tree | 8b7a71f929ed5f4b66c3fe1e919aac365a67746f | |
parent | 6209bfafad7d4ad57b105fe9fdfc90298ebd4a69 (diff) |
Remove scanlineOrder switch statements that always do the same thing
I think these date back to GIF codec having a third value of this enum
that meant "interlaced" ?
Change-Id: Iaff11a55ad3cff44da2307149991a22447dfe746
Reviewed-on: https://skia-review.googlesource.com/119146
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r-- | dm/DMSrcSink.cpp | 11 | ||||
-rw-r--r-- | fuzz/fuzz.cpp | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 6a14c6363c..4ddebb7e4c 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -616,14 +616,9 @@ Error CodecSrc::draw(SkCanvas* canvas) const { return "Could not start scanline decoder"; } - switch (codec->getScanlineOrder()) { - case SkCodec::kTopDown_SkScanlineOrder: - case SkCodec::kBottomUp_SkScanlineOrder: - // We do not need to check the return value. On an incomplete - // image, memory will be filled with a default value. - codec->getScanlines(dst, height, rowBytes); - break; - } + // We do not need to check the return value. On an incomplete + // image, memory will be filled with a default value. + codec->getScanlines(dst, height, rowBytes); } draw_to_canvas(canvas, bitmapInfo, dst, rowBytes, fDstColorType); diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp index 657879ea9b..d75d658d22 100644 --- a/fuzz/fuzz.cpp +++ b/fuzz/fuzz.cpp @@ -298,14 +298,9 @@ static void fuzz_img(sk_sp<SkData> bytes, uint8_t scale, uint8_t mode) { void* dst = bitmap.getAddr(0, 0); size_t rowBytes = bitmap.rowBytes(); uint32_t height = decodeInfo.height(); - switch (codec->getScanlineOrder()) { - case SkCodec::kTopDown_SkScanlineOrder: - case SkCodec::kBottomUp_SkScanlineOrder: - // We do not need to check the return value. On an incomplete - // image, memory will be filled with a default value. - codec->getScanlines(dst, height, rowBytes); - break; - } + // We do not need to check the return value. On an incomplete + // image, memory will be filled with a default value. + codec->getScanlines(dst, height, rowBytes); SkDebugf("[terminated] Success!\n"); break; } |