aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-08-31 06:55:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-31 06:55:13 -0700
commit5406d6f39ad042e7a0a0d4ea16beca4fe2b66492 (patch)
treeaf812bd6efebdd5dfec260883ee9047426011652 /tests
parent8db52b6367956c22e0cb1be8a9b77b154d21bbf9 (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/CodexTest.cpp6
-rw-r--r--tests/SwizzlerTest.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 81d8eb42b5..27c48fb4b8 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -158,7 +158,9 @@ static void check(skiatest::Reporter* r,
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 @@ DEF_TEST(Codec, r) {
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 6f0dabeb11..256a4b2bcd 100644
--- a/tests/SwizzlerTest.cpp
+++ b/tests/SwizzlerTest.cpp
@@ -37,7 +37,7 @@ static void check_fill(skiatest::Reporter* r,
// 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