Chromium Code Reviews| Index: src/codec/SkPngCodec.h |
| diff --git a/src/codec/SkPngCodec.h b/src/codec/SkPngCodec.h |
| index aace7b1c4cedabaf0548ce90e2b48648ce1e0139..7bb833d10d836fc45f7663b1c1af92063306f2e8 100644 |
| --- a/src/codec/SkPngCodec.h |
| +++ b/src/codec/SkPngCodec.h |
| @@ -14,7 +14,11 @@ |
| #include "SkRefCnt.h" |
| #include "SkSwizzler.h" |
| -#include "png.h" |
| +// Instead of including png.h here, forward declare the few types we refer to. |
|
msarett
2016/08/24 16:41:51
This should work. I believe we've had issues in t
|
| +struct png_struct_def; |
| +struct png_info_def; |
| +typedef png_struct_def png_struct; |
| +typedef png_info_def png_info; |
| class SkStream; |
| @@ -47,11 +51,11 @@ protected: |
| int startRow) = 0; |
| SkPngCodec(const SkEncodedInfo&, const SkImageInfo&, SkStream*, SkPngChunkReader*, |
| - png_structp, png_infop, int, int); |
| + png_struct*, png_info*, int, int); |
| SkAutoTUnref<SkPngChunkReader> fPngChunkReader; |
| - png_structp fPng_ptr; |
| - png_infop fInfo_ptr; |
| + png_struct* fPng_ptr; |
| + png_info* fInfo_ptr; |
| // These are stored here so they can be used both by normal decoding and scanline decoding. |
| SkAutoTUnref<SkColorTable> fColorTable; // May be unpremul. |