Index: src/codec/SkCodec_libpng.h |
diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h |
index a105c3c5e35659d3ee4ca3398108db7aa1ab21b2..f124e04eb5fcd8dfebced9da8c0c53c3be5201cd 100644 |
--- a/src/codec/SkCodec_libpng.h |
+++ b/src/codec/SkCodec_libpng.h |
@@ -44,15 +44,21 @@ private: |
SkSwizzler::SrcConfig fSrcConfig; |
int fNumberPasses; |
bool fReallyHasAlpha; |
+ int fBitDepth; |
- SkPngCodec(const SkImageInfo&, SkStream*, png_structp, png_infop); |
+ SkPngCodec(const SkImageInfo&, SkStream*, png_structp, png_infop, int); |
~SkPngCodec(); |
+ |
// Helper to set up swizzler and color table. Also calls png_read_update_info. |
Result initializeSwizzler(const SkImageInfo& requestedInfo, void* dst, |
size_t rowBytes, const Options&, SkPMColor*, int* ctableCount); |
- // Calls rewindIfNeeded, and returns true if the decoder can continue. |
- bool handleRewind(); |
+ |
+ // Sets libpng to decode to the data format of requestedInfo |
+ Result setDataFormat(const SkImageInfo& requestedInfo); |
+ |
+ // Calls rewindIfNeeded and setDataFormat and returns true if the decoder can continue. |
+ bool handleRewind(const SkImageInfo& requestedInfo); |
bool decodePalette(bool premultiply, int bitDepth, int* ctableCount); |
void finish(); |
void destroyReadStruct(); |