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

Unified Diff: src/codec/SkCodec.cpp

Issue 1010903003: Add scanline decoding to SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Build with no-clobbered Created 5 years, 9 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 0411e44069e32cd15e7e218ac2100eb6649e6080..015b1229747f7e7aec98c21062ecf4cf6e7a31e7 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -61,3 +61,12 @@ bool SkCodec::rewindIfNeeded() {
fNeedsRewind = true;
return !neededRewind || fStream->rewind();
}
+
+SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) {
+ fScanlineDecoder.reset(NULL);
+ if (!rewindIfNeeded()) {
+ return NULL;
+ }
+ fScanlineDecoder.reset(this->onGetScanlineDecoder(dstInfo));
+ return fScanlineDecoder.get();
+}
« 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