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

Unified Diff: src/codec/SkCodec.cpp

Issue 1061713007: Adding png scanline decoding to kIndex8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ctableCount requirements Created 5 years, 8 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
Index: src/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index c4e488565e698d30c044270458cbf93cc45ec597..85f2414ecbf8a700a40aa2f87bcf6d54a1baef0e 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -90,7 +90,23 @@ SkCodec::RewindState SkCodec::rewindIfNeeded() {
: kCouldNotRewind_RewindState;
}
-SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) {
- fScanlineDecoder.reset(this->onGetScanlineDecoder(dstInfo));
+SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo, const Options* options,
+ SkPMColor ctable[], int* ctableCount) {
+
+ // Set options.
+ Options optsStorage;
+ if (NULL == options) {
+ options = &optsStorage;
+ }
+
+ fScanlineDecoder.reset(this->onGetScanlineDecoder(dstInfo, *options, ctable, ctableCount));
return fScanlineDecoder.get();
}
+
+SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) {
+ SkASSERT(kIndex_8_SkColorType != dstInfo.colorType());
+ if (kIndex_8_SkColorType == dstInfo.colorType()) {
+ return NULL;
+ }
+ return this->getScanlineDecoder(dstInfo, NULL, NULL, NULL);
+}
« include/codec/SkCodec.h ('K') | « include/codec/SkCodec.h ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698