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

Unified Diff: tests/CodexTest.cpp

Issue 1212593003: Destroy SkScanlineDecoder in the SkCodec subclass destructors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Detachable SkScanlineDecoder Created 5 years, 6 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
« src/codec/SkJpegCodec.cpp ('K') | « src/codec/SkJpegCodec.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 5c969908b9ecb4122ba604b05623e9442d558f3a..0edd3cf907d62159e0ba5ff00de4288453ab59dd 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -72,6 +72,10 @@ static void check(skiatest::Reporter* r,
if (supportsScanlineDecoding) {
bm.eraseColor(SK_ColorYELLOW);
REPORTER_ASSERT(r, scanlineDecoder);
+
+ // Regular decodes should be disabled after creating a scanline decoder
+ result = codec->getPixels(info, bm.getPixels(), bm.rowBytes(), NULL, NULL, NULL);
+ REPORTER_ASSERT(r, SkImageGenerator::kInvalidParameters == result);
for (int y = 0; y < info.height(); y++) {
result = scanlineDecoder->getScanlines(bm.getAddr(0, y), 1, 0);
REPORTER_ASSERT(r, result == SkImageGenerator::kSuccess);
« src/codec/SkJpegCodec.cpp ('K') | « src/codec/SkJpegCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698