summaryrefslogtreecommitdiff
path: root/chromium
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-05-18 16:11:39 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-03 16:02:13 +0200
commit19de26b7efd6b993f2af26cf435f04c716d3f5bc (patch)
treef254beb9a7ad81230b0193cc3d50174d5fc1a73f /chromium
parentff101f01e6b1bbb329808e8783e36196cee36e1b (diff)
downloadqtwebengine-chromium-19de26b7efd6b993f2af26cf435f04c716d3f5bc.tar.gz
Fix build with PNG_LIBPNG_VER >= 10500
Upstream broke building against newer libpng versions. Change-Id: Ice1979e28b1bcd68751fba23c2321cf3c4a34120 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium')
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp b/chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
index 6deba9ce22a..ca8ab8e5aaa 100644
--- a/chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -58,12 +58,19 @@ inline sk_sp<SkColorSpace> readColorSpace(png_structp png, png_infop info) {
if (png_get_valid(png, info, PNG_INFO_sRGB))
return SkColorSpace::MakeSRGB();
- png_charp name;
- int compression;
- png_bytep profile;
- png_uint_32 length;
- if (png_get_iCCP(png, info, &name, &compression, &profile, &length))
+#ifdef PNG_iCCP_SUPPORTED
+ png_charp name = nullptr;
+ int compression = 0;
+#if (PNG_LIBPNG_VER < 10500)
+ png_charp profile = nullptr;
+#else
+ png_bytep profile = nullptr;
+#endif
+ png_uint_32 length = 0;
+ if (png_get_iCCP(png, info, &name, &compression, &profile, &length)) {
return SkColorSpace::MakeICC(profile, length);
+ }
+#endif // #ifdef PNG_iCCP_SUPPORTED
png_fixed_point chrm[8];
if (!png_get_cHRM_fixed(png, info, &chrm[0], &chrm[1], &chrm[2], &chrm[3],