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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 1381483002: Call rewindIfNeeded in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@codecSDmerge
Patch Set: Rebase Created 5 years, 3 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/SkCodec_wbmp.cpp ('k') | src/codec/SkWebpCodec.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 dac0c17b77f290dd8e0c92448cf71ef8314c60e5..b4c794c90623111d3835b0673d5ec88eb5c42d32 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -303,11 +303,6 @@ bool SkJpegCodec::nativelyScaleToDimensions(uint32_t dstWidth, uint32_t dstHeigh
SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo,
void* dst, size_t dstRowBytes,
const Options& options, SkPMColor*, int*) {
- // Rewind the stream if needed
- if (!this->rewindIfNeeded()) {
- return fDecoderMgr->returnFailure("could not rewind stream", kCouldNotRewind);
- }
-
if (options.fSubset) {
// Subsets are not supported.
return kUnimplemented;
@@ -412,11 +407,6 @@ SkCodec::Result SkJpegCodec::initializeSwizzler(const SkImageInfo& info, const O
SkCodec::Result SkJpegCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
const Options& options, SkPMColor ctable[], int* ctableCount) {
- // Rewind the stream if needed
- if (!this->rewindIfNeeded()) {
- return kCouldNotRewind;
- }
-
// Set the jump location for libjpeg errors
if (setjmp(fDecoderMgr->getJmpBuf())) {
SkCodecPrintf("setjmp: Error from libjpeg\n");
« no previous file with comments | « src/codec/SkCodec_wbmp.cpp ('k') | src/codec/SkWebpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698