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

Unified Diff: include/codec/SkCodec.h

Issue 1390213002: Add subsetting to SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@fill-refactor
Patch Set: Clean up and response to comments Created 5 years, 2 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 | « dm/DMSrcSink.cpp ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 1b9cb0f5d7e3afb73b0fda2dde8a593e55058ed4..5938ded30a148b05ed2b7226d066bc888bfd1af4 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -173,6 +173,16 @@ public:
*
* If the EncodedFormat is kWEBP_SkEncodedFormat (the only one which
* currently supports subsets), the top and left values must be even.
+ *
+ * The above description applies to getPixels() but the usage is
scroggo 2015/10/12 16:11:20 I think it would be better to say something like:
msarett 2015/10/12 17:13:55 Done.
+ * slightly different when we want to startScanlineDecode(). It
+ * does not make a lot of sense to specify a fSubsetTop or
+ * fSubsetHeight when scanline decoding, since the client already
+ * controls which rows to get and which rows to skip. During scanline
+ * decodes, we will require that fSubsetTop be zero and fSubsetHeight
+ * be the full height. We will, however, use the values of
+ * fSubsetLeft and fSubsetWidth to decode partial scanlines on calls
+ * to getScanlines().
*/
SkIRect* fSubset;
};
@@ -259,11 +269,11 @@ public:
* @return Enum representing success or reason for failure.
*/
Result startScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options* options,
- SkPMColor ctable[], int* ctableCount);
+ SkPMColor ctable[], int* ctableCount);
/**
* Simplified version of startScanlineDecode() that asserts that info is NOT
- * kIndex8_SkColorType and uses the default Options.
+ * kIndex8_SkColorType and uses the default options.
scroggo 2015/10/12 16:11:20 Why this change?
msarett 2015/10/12 17:13:55 I changed this comment when I changed the API, and
*/
Result startScanlineDecode(const SkImageInfo& dstInfo);
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698