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

Unified Diff: src/codec/SkIcoCodec.h

Issue 1997703003: Make SkPngCodec decode progressively. (Closed) Base URL: https://skia.googlesource.com/skia.git@foil
Patch Set: Fixes for ICO, Incomplete, comments Created 4 years, 7 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/SkIcoCodec.h
diff --git a/src/codec/SkIcoCodec.h b/src/codec/SkIcoCodec.h
index 8c56aee4c6ca135da33d0aa7824db1fab863bd84..988c8b6ff765c1def632a8bd337544b5ed0f6419 100644
--- a/src/codec/SkIcoCodec.h
+++ b/src/codec/SkIcoCodec.h
@@ -54,6 +54,12 @@ private:
bool onSkipScanlines(int count) override;
+ Result onStartIncrementalDecode(const SkImageInfo& dstInfo,
+ const SkCodec::Options&, SkPMColor*, int*) override;
+
+ Result onIncrementalDecode(std::function<void*(int)> callback,
+ int* rowsDecoded) override;
+
SkSampler* getSampler(bool createIfNecessary) override;
/*
@@ -84,5 +90,13 @@ private:
// SkAutoTDelete. It will be deleted by the destructor of fEmbeddedCodecs.
SkCodec* fCurrScanlineCodec;
+ // Only used by incremental decoder. onStartIncrementalDecode() will set
+ // fCurrIncrementalCodec to one of the fEmbeddedCodecs, if it can find a
+ // codec of the appropriate size. We will use fCurrIncrementalCodec for
+ // subsequent calls to incrementalDecode().
+ // fCurrIncrementalCodec is owned by this class, but should not be an
+ // SkAutoTDelete. It will be deleted by the destructor of fEmbeddedCodecs.
+ SkCodec* fCurrIncrementalCodec;
+
typedef SkCodec INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698