| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCodec_libpng.h" | 8 #include "SkCodec_libpng.h" |
| 9 #include "SkCodecPriv.h" | 9 #include "SkCodecPriv.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| 11 #include "SkColorTable.h" | 11 #include "SkColorTable.h" |
| 12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
| 13 #include "SkMath.h" | 13 #include "SkMath.h" |
| 14 #include "SkScaledCodec.h" | |
| 15 #include "SkSize.h" | 14 #include "SkSize.h" |
| 16 #include "SkStream.h" | 15 #include "SkStream.h" |
| 17 #include "SkSwizzler.h" | 16 #include "SkSwizzler.h" |
| 18 | 17 |
| 19 /////////////////////////////////////////////////////////////////////////////// | 18 /////////////////////////////////////////////////////////////////////////////// |
| 20 // Helper macros | 19 // Helper macros |
| 21 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
| 22 | 21 |
| 23 #ifndef png_jmpbuf | 22 #ifndef png_jmpbuf |
| 24 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) | 23 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 } | 835 } |
| 837 | 836 |
| 838 if (1 == numberPasses) { | 837 if (1 == numberPasses) { |
| 839 return new SkPngScanlineDecoder(imageInfo, streamDeleter.detach(), png_p
tr, info_ptr, | 838 return new SkPngScanlineDecoder(imageInfo, streamDeleter.detach(), png_p
tr, info_ptr, |
| 840 bitDepth); | 839 bitDepth); |
| 841 } | 840 } |
| 842 | 841 |
| 843 return new SkPngInterlacedScanlineDecoder(imageInfo, streamDeleter.detach(),
png_ptr, | 842 return new SkPngInterlacedScanlineDecoder(imageInfo, streamDeleter.detach(),
png_ptr, |
| 844 info_ptr, bitDepth, numberPasses); | 843 info_ptr, bitDepth, numberPasses); |
| 845 } | 844 } |
| OLD | NEW |