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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 2155163004: Revert of Fix rewinding bug in SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | tests/CodecTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.cpp
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index eb059545bf0359fcd5c6a96f396a1ee25d36568f..0413f79a3c358466f4542d5812461adab209104e 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -339,11 +339,6 @@
}
SkASSERT(nullptr != decoderMgr);
fDecoderMgr.reset(decoderMgr);
-
- fSwizzler.reset(nullptr);
- fSrcRow = nullptr;
- fStorage.reset();
-
return true;
}
@@ -593,6 +588,11 @@
return kInvalidConversion;
}
+ // Remove objects used for sampling.
+ fSwizzler.reset(nullptr);
+ fSrcRow = nullptr;
+ fStorage.reset();
+
// Now, given valid output dimensions, we can start the decompress
if (!jpeg_start_decompress(fDecoderMgr->dinfo())) {
SkCodecPrintf("start decompress failed\n");
« no previous file with comments | « no previous file | tests/CodecTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698