| 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 9 #include "SkCodecPriv.h" | 9 #include "SkCodecPriv.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| 11 #include "SkColorSpace_Base.h" | 11 #include "SkColorSpace_Base.h" |
| 12 #include "SkColorTable.h" | 12 #include "SkColorTable.h" |
| 13 #include "SkMath.h" | 13 #include "SkMath.h" |
| 14 #include "SkOpts.h" | 14 #include "SkOpts.h" |
| 15 #include "SkPngCodec.h" | 15 #include "SkPngCodec.h" |
| 16 #include "SkPoint3.h" | 16 #include "SkPoint3.h" |
| 17 #include "SkSize.h" | 17 #include "SkSize.h" |
| 18 #include "SkStream.h" | 18 #include "SkStream.h" |
| 19 #include "SkSwizzler.h" | 19 #include "SkSwizzler.h" |
| 20 #include "SkTemplates.h" | 20 #include "SkTemplates.h" |
| 21 #include "SkUtils.h" | 21 #include "SkUtils.h" |
| 22 | 22 |
| 23 #include "png.h" |
| 24 |
| 23 // This warning triggers false postives way too often in here. | 25 // This warning triggers false postives way too often in here. |
| 24 #if defined(__GNUC__) && !defined(__clang__) | 26 #if defined(__GNUC__) && !defined(__clang__) |
| 25 #pragma GCC diagnostic ignored "-Wclobbered" | 27 #pragma GCC diagnostic ignored "-Wclobbered" |
| 26 #endif | 28 #endif |
| 27 | 29 |
| 28 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
| 29 // Callback functions | 31 // Callback functions |
| 30 /////////////////////////////////////////////////////////////////////////////// | 32 /////////////////////////////////////////////////////////////////////////////// |
| 31 | 33 |
| 32 static void sk_error_fn(png_structp png_ptr, png_const_charp msg) { | 34 static void sk_error_fn(png_structp png_ptr, png_const_charp msg) { |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 SkCodec* outCodec; | 926 SkCodec* outCodec; |
| 925 if (read_header(stream, chunkReader, &outCodec, nullptr, nullptr)) { | 927 if (read_header(stream, chunkReader, &outCodec, nullptr, nullptr)) { |
| 926 // Codec has taken ownership of the stream. | 928 // Codec has taken ownership of the stream. |
| 927 SkASSERT(outCodec); | 929 SkASSERT(outCodec); |
| 928 streamDeleter.release(); | 930 streamDeleter.release(); |
| 929 return outCodec; | 931 return outCodec; |
| 930 } | 932 } |
| 931 | 933 |
| 932 return nullptr; | 934 return nullptr; |
| 933 } | 935 } |
| OLD | NEW |