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

Unified Diff: src/codec/SkCodec.cpp

Issue 1230033004: Allow creating multiple scanline decoders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Progressive scanline decoder needs to handle rewind on first call. Created 5 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 | « include/codec/SkScanlineDecoder.h ('k') | src/codec/SkCodec_libpng.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index 760975ece0cfe40af0af8e83a9c202de672b4614..a80b490274f00d7eb88ddc0600b8f52ab136eef0 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -16,7 +16,6 @@
#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
#include "SkJpegCodec.h"
#endif
-#include "SkScanlineDecoder.h"
#include "SkStream.h"
#include "SkWebpCodec.h"
@@ -80,12 +79,9 @@ SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream)
: fInfo(info)
, fStream(stream)
, fNeedsRewind(false)
- , fScanlineDecoder(NULL)
{}
-SkCodec::~SkCodec() {
- SkDELETE(fScanlineDecoder);
-}
+SkCodec::~SkCodec() {}
SkCodec::RewindState SkCodec::rewindIfNeeded() {
// Store the value of fNeedsRewind so we can update it. Next read will
@@ -153,9 +149,7 @@ SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo, const
options = &optsStorage;
}
- SkDELETE(fScanlineDecoder);
- fScanlineDecoder = this->onGetScanlineDecoder(dstInfo, *options, ctable, ctableCount);
- return fScanlineDecoder;
+ return this->onGetScanlineDecoder(dstInfo, *options, ctable, ctableCount);
}
SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) {
« no previous file with comments | « include/codec/SkScanlineDecoder.h ('k') | src/codec/SkCodec_libpng.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698