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

Unified Diff: src/codec/SkCodec_libpng.h

Issue 1212373006: Swizzling, except for premultiplying, done using libpng transforms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removing changes from SkMallocPixelRef Created 5 years, 6 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
« no previous file with comments | « no previous file | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698