aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkCodec_libpng.h
diff options
context:
space:
mode:
authorGravatar emmaleer <emmaleer@google.com>2015-07-01 14:44:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-01 14:44:32 -0700
commit9693037fd41b7ce545b44beaa3489dcfd915018c (patch)
treec8b5a12e90a5cf488b253d7d2e55954d2f089bca /src/codec/SkCodec_libpng.h
parent40141b57f061fbfcc2fa38da942d9efe25aca4d0 (diff)
This change:
- supports kGray correctly - avoid extra call to png_get_IHDR by storing the bit depth - call transforms as needed - checks for tRNS alpha value in RGB and GRAY color types BUG=skia: Review URL: https://codereview.chromium.org/1214203005
Diffstat (limited to 'src/codec/SkCodec_libpng.h')
-rw-r--r--src/codec/SkCodec_libpng.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h
index a105c3c5e3..c0fee74e96 100644
--- a/src/codec/SkCodec_libpng.h
+++ b/src/codec/SkCodec_libpng.h
@@ -44,14 +44,17 @@ 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.
+
+ // Calls rewindIfNeeded and returns true if the decoder can continue.
bool handleRewind();
bool decodePalette(bool premultiply, int bitDepth, int* ctableCount);
void finish();