Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: tests/CodexTest.cpp

Issue 1267583002: Create a scanline decoder without creating a codec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix interlaced Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkScanlineDecoder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 82e490a2bd5676d2eb69be89cdd5e5d69eb33725..1dd64d9a6dacb5a6b4fa7b91721da6c39d84a057 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -95,17 +95,14 @@ static void check(skiatest::Reporter* r,
// verify that re-decoding gives the same result.
compare_to_good_digest(r, digest, bm);
- SkAutoTDelete<SkScanlineDecoder> scanlineDecoder(codec->getScanlineDecoder(info));
+ stream.reset(resource(path));
+ SkAutoTDelete<SkScanlineDecoder> scanlineDecoder(
+ SkScanlineDecoder::NewFromStream(stream.detach()));
if (supportsScanlineDecoding) {
bm.eraseColor(SK_ColorYELLOW);
REPORTER_ASSERT(r, scanlineDecoder);
- // Regular decodes should not be affected by creating a scanline decoder
- result = codec->getPixels(info, bm.getPixels(), bm.rowBytes(), NULL, NULL, NULL);
- REPORTER_ASSERT(r, SkCodec::kSuccess == result);
- compare_to_good_digest(r, digest, bm);
-
- bm.eraseColor(SK_ColorYELLOW);
+ REPORTER_ASSERT(r, scanlineDecoder->start(info) == SkCodec::kSuccess);
for (int y = 0; y < info.height(); y++) {
result = scanlineDecoder->getScanlines(bm.getAddr(0, y), 1, 0);
« no previous file with comments | « src/codec/SkScanlineDecoder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698