Chromium Code Reviews| Index: include/codec/SkCodec.h |
| diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h |
| index 6f313a1c7058715c8e7c95a82ca1448b152b245e..523181a3d42f0e0fec8a46b42d3692168074cc88 100644 |
| --- a/include/codec/SkCodec.h |
| +++ b/include/codec/SkCodec.h |
| @@ -70,6 +70,15 @@ 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 dstInfo.colorType() is |
| + * kIndex8 mode. |
| + * @param ctableCount A pointer to the size of the color table. When |
| + * dstInfo.colorType() is kIndex8, this should be non-NULL and should |
| + * be a pointer to 256. It will be modified to the actual size of |
|
scroggo
2015/04/22 17:43:53
It does not make a lot of sense to me to say it mu
msarett
2015/04/22 18:05:38
I agree with you. I was trying to match the requi
scroggo
2015/04/22 18:41:36
I *think* the idea was that a client could use a s
msarett
2015/04/22 20:03:32
I think I misinterpreted the comments in SkImageGe
|
| + * the color table (<= 256) after decoding the palette. |
| * @return New SkScanlineDecoder, or NULL on failure. |
| * |
| * NOTE: If any rows were previously decoded, this requires rewinding the |
| @@ -78,6 +87,13 @@ public: |
| * NOTE: The scanline decoder is owned by the SkCodec and will delete it |
| * when the SkCodec is deleted. |
| */ |
| + SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo, const Options* options, |
| + SkPMColor ctable[], int* ctableCount); |
| + |
| + /** |
| + * Simplified version of getScanlineDecoder() that asserts that info is NOT |
| + * kIndex8_SkColorType and uses the default Options. |
| + */ |
| SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo); |
| /** |
| @@ -126,10 +142,22 @@ 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 dstInfo.colorType() is |
| + * kIndex8 mode. |
| + * @param ctableCount A pointer to the size of the color table. When |
| + * dstInfo.colorType() is kIndex8, this should be non-NULL and should |
| + * be a pointer to 256. It will be modified to the actual size of |
| + * the color table (<= 256) after decoding the palette. |
| * @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; |
| } |