Scanline decoding for bmp
Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided
Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.
BUG=skia:3257
BUG=skia:4198
Review URL: https://codereview.chromium.org/1287423002
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 81d8eb4..27c48fb 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -158,7 +158,9 @@
REPORTER_ASSERT(r, result == SkCodec::kSuccess);
}
// verify that scanline decoding gives the same result.
- compare_to_good_digest(r, digest, bm);
+ if (SkScanlineDecoder::kTopDown_SkScanlineOrder == scanlineDecoder->getScanlineOrder()) {
+ compare_to_good_digest(r, digest, bm);
+ }
} else {
REPORTER_ASSERT(r, !scanlineDecoder);
}
@@ -209,7 +211,7 @@
check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true);
// BMP
- check(r, "randPixels.bmp", SkISize::Make(8, 8), false, false);
+ check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false);
// ICO
// These two tests examine interestingly different behavior:
diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp
index 6f0dabe..256a4b2 100644
--- a/tests/SwizzlerTest.cpp
+++ b/tests/SwizzlerTest.cpp
@@ -37,7 +37,7 @@
// Fill image with the fill value starting at the indicated row
SkSwizzler::Fill(imageStart, imageInfo, rowBytes, endRow - startRow + 1, colorOrIndex,
- colorTable);
+ colorTable, SkCodec::kNo_ZeroInitialized);
// Ensure that the pixels are filled properly
// The bots should catch any memory corruption