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

Unified Diff: src/codec/SkSwizzler.h

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 | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSwizzler.h
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h
index be20d0ea996b4ee4b8c427fb946a5a04fac27609..63afbf73bc3d75717f20dc8650f64e3f54d29425 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -18,6 +18,7 @@ public:
* Enum describing the config of the source data.
*/
enum SrcConfig {
+ kUnknown, // Invalid type.
kGray,
kIndex1,
kIndex2,
@@ -144,6 +145,17 @@ public:
*
*/
ResultAlpha next(const uint8_t* SK_RESTRICT src, int y);
+
+ /**
+ * Update the destination row.
+ *
+ * Typically this is done by next, but for a client that wants to manually
+ * modify the destination row (for example, for decoding scanline one at a
+ * time) they can call this before each call to next.
+ * TODO: Maybe replace this with a version of next which allows supplying the
+ * destination?
+ */
+ void setDstRow(void* dst) { fDstRow = dst; }
private:
#ifdef SK_DEBUG
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698