Chromium Code Reviews| Index: include/codec/SkCodec.h |
| diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h |
| index 6f313a1c7058715c8e7c95a82ca1448b152b245e..b3898892b09c3ce3fcaec86b2f9d87465f61cff3 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. When dstInfo.colorType() is |
| + * kIndex8, this should be non-NULL and have enough storage for 256 |
| + * colors. The color table will be populated after decoding the palette. |
| + * @param ctableCount A pointer to the size of the color table. When |
| + * dstInfo.colorType() is kIndex8, this should be non-NULL. It will |
| + * be modified to the true size of 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, |
|
djsollen
2015/04/29 14:02:58
const* for options here and const& on the protecte
scroggo
2015/04/29 14:13:22
This follows a pattern I've used elsewhere in SkCo
|
| + 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. When dstInfo.colorType() is |
| + * kIndex8, this should be non-NULL and have enough storage for 256 |
| + * colors. The color table will be populated after decoding the palette. |
| + * @param ctableCount A pointer to the size of the color table. When |
| + * dstInfo.colorType() is kIndex8, this should be non-NULL. It will |
| + * be modified to the true 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; |
| } |