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 // This warning triggers false postives way too often in here. |
| 24 #if defined(__GNUC__) && !defined(__clang__) |
| 25 #pragma GCC diagnostic ignored "-Wclobbered" |
| 26 #endif |
| 27 |
23 /////////////////////////////////////////////////////////////////////////////// | 28 /////////////////////////////////////////////////////////////////////////////// |
24 // Callback functions | 29 // Callback functions |
25 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
26 | 31 |
27 static void sk_error_fn(png_structp png_ptr, png_const_charp msg) { | 32 static void sk_error_fn(png_structp png_ptr, png_const_charp msg) { |
28 SkCodecPrintf("------ png error %s\n", msg); | 33 SkCodecPrintf("------ png error %s\n", msg); |
29 longjmp(png_jmpbuf(png_ptr), 1); | 34 longjmp(png_jmpbuf(png_ptr), 1); |
30 } | 35 } |
31 | 36 |
32 void sk_warning_fn(png_structp, png_const_charp msg) { | 37 void sk_warning_fn(png_structp, png_const_charp msg) { |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 SkCodec* outCodec; | 875 SkCodec* outCodec; |
871 if (read_header(stream, chunkReader, &outCodec, nullptr, nullptr)) { | 876 if (read_header(stream, chunkReader, &outCodec, nullptr, nullptr)) { |
872 // Codec has taken ownership of the stream. | 877 // Codec has taken ownership of the stream. |
873 SkASSERT(outCodec); | 878 SkASSERT(outCodec); |
874 streamDeleter.release(); | 879 streamDeleter.release(); |
875 return outCodec; | 880 return outCodec; |
876 } | 881 } |
877 | 882 |
878 return nullptr; | 883 return nullptr; |
879 } | 884 } |
OLD | NEW |