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

Unified Diff: include/codec/SkCodec.h

Issue 1061713007: Adding png scanline decoding to kIndex8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 6f313a1c7058715c8e7c95a82ca1448b152b245e..26134b61ded220abdec797311430a1566bc68c24 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -70,6 +70,13 @@ public:
*
* @param dstInfo Info of the destination. If the dimensions do not match
* those of getInfo, this implies a scale.
+ * @param options Contains decoding options, including if memory is zero
+ * initialized.
+ * @param ctable A pointer to a color table. This color table will be
+ * populated if the png has a color palette and we ask to decode in
scroggo 2015/04/21 21:43:05 nit: "we ask to decode in" -> dstInfo.colorType()
msarett 2015/04/22 14:32:52 Done.
+ * kIndex8 mode.
+ * @param ctableCount A pointer to the size of the color table. Will be
+ * modified in kIndex8 mode if we have a color palette.
scroggo 2015/04/21 21:43:04 modified to what?
msarett 2015/04/22 14:32:52 Done.
* @return New SkScanlineDecoder, or NULL on failure.
*
* NOTE: If any rows were previously decoded, this requires rewinding the
@@ -78,7 +85,8 @@ public:
* NOTE: The scanline decoder is owned by the SkCodec and will delete it
* when the SkCodec is deleted.
*/
- SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo);
+ SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo, const Options* options,
scroggo 2015/04/21 21:43:05 Should we have a version that does not take Option
msarett 2015/04/22 14:32:52 I have added this version.
+ SkPMColor ctable[], int* ctableCount);
/**
* Some images may initially report that they have alpha due to the format
@@ -126,10 +134,20 @@ protected:
*
* @param dstInfo Info of the destination. If the dimensions do not match
* those of getInfo, this implies a scale.
+ * @param options Contains decoding options, including if memory is zero
+ * initialized.
+ * @param ctable A pointer to a color table. This color table will be
+ * populated if the png has a color palette and we ask to decode in
scroggo 2015/04/21 21:43:05 same wording nit.
msarett 2015/04/22 14:32:52 Done.
+ * kIndex8 mode.
+ * @param ctableCount A pointer to the size of the color table. Will be
+ * modified in kIndex8 mode if we have a color palette.
scroggo 2015/04/21 21:43:05 same question
msarett 2015/04/22 14:32:52 Done.
* @return New SkScanlineDecoder on success, NULL otherwise. The SkCodec
* will take ownership of the returned scanline decoder.
*/
- virtual SkScanlineDecoder* onGetScanlineDecoder(const SkImageInfo& dstInfo) {
+ virtual SkScanlineDecoder* onGetScanlineDecoder(const SkImageInfo& dstInfo,
+ const Options& options,
+ SkPMColor ctable[],
+ int* ctableCount) {
return NULL;
}
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkCodec.cpp » ('j') | src/codec/SkCodec_libpng.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698