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

Side by Side Diff: src/images/SkImageDecoder_libpng.cpp

Issue 1032253003: Enable both static and dynamically linked libpng (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkImageDecoder.h" 8 #include "SkImageDecoder.h"
9 #include "SkImageEncoder.h" 9 #include "SkImageEncoder.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkDither.h" 12 #include "SkDither.h"
13 #include "SkMath.h" 13 #include "SkMath.h"
14 #include "SkRTConf.h" 14 #include "SkRTConf.h"
15 #include "SkScaledBitmapSampler.h" 15 #include "SkScaledBitmapSampler.h"
16 #include "SkStream.h" 16 #include "SkStream.h"
17 #include "SkTemplates.h" 17 #include "SkTemplates.h"
18 #include "SkUtils.h" 18 #include "SkUtils.h"
19 #include "transform_scanline.h" 19 #include "transform_scanline.h"
20
20 extern "C" { 21 extern "C" {
21 #include "png.h" 22 #ifdef SKIA_PNG_PREFIXED
scroggo 2015/04/01 15:40:20 nit: Why are you using two space indents?
djsollen 2015/04/01 17:19:01 Done.
23 // this must proceed png.h
24 #include "pngprefix.h"
25 #endif
26 #include "png.h"
22 } 27 }
23 28
24 /* These were dropped in libpng >= 1.4 */ 29 /* These were dropped in libpng >= 1.4 */
25 #ifndef png_infopp_NULL 30 #ifndef png_infopp_NULL
26 #define png_infopp_NULL NULL 31 #define png_infopp_NULL NULL
27 #endif 32 #endif
28 33
29 #ifndef png_bytepp_NULL 34 #ifndef png_bytepp_NULL
30 #define png_bytepp_NULL NULL 35 #define png_bytepp_NULL NULL
31 #endif 36 #endif
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 return SkImageDecoder::kUnknown_Format; 1285 return SkImageDecoder::kUnknown_Format;
1281 } 1286 }
1282 1287
1283 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) { 1288 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) {
1284 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL; 1289 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL;
1285 } 1290 }
1286 1291
1287 static SkImageDecoder_DecodeReg gDReg(sk_libpng_dfactory); 1292 static SkImageDecoder_DecodeReg gDReg(sk_libpng_dfactory);
1288 static SkImageDecoder_FormatReg gFormatReg(get_format_png); 1293 static SkImageDecoder_FormatReg gFormatReg(get_format_png);
1289 static SkImageEncoder_EncodeReg gEReg(sk_libpng_efactory); 1294 static SkImageEncoder_EncodeReg gEReg(sk_libpng_efactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698