| Index: third_party/libpng/pngrutil.c
|
| diff --git a/third_party/libpng/pngrutil.c b/third_party/libpng/pngrutil.c
|
| index 10588c4e1d0d0b469384cc6e8fef4be05adb18d6..c3afd6cdd1dd4247054b19fa84650ac2d6de9ffa 100644
|
| --- a/third_party/libpng/pngrutil.c
|
| +++ b/third_party/libpng/pngrutil.c
|
| @@ -698,6 +698,11 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
| /* Should be an error, but we can cope with it */
|
| png_warning(png_ptr, "Out of place gAMA chunk");
|
|
|
| +#ifdef CHROME_PNG_READ_iCCP_sRGB_cHRM_gAMA
|
| + if (info_ptr != NULL)
|
| + info_ptr->chroma_or_gamma |= PNG_INFO_gAMA;
|
| +#endif
|
| +
|
| if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
|
| #ifdef PNG_READ_sRGB_SUPPORTED
|
| && !(info_ptr->valid & PNG_INFO_sRGB)
|
| @@ -848,6 +853,11 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
| /* Should be an error, but we can cope with it */
|
| png_warning(png_ptr, "Missing PLTE before cHRM");
|
|
|
| +#ifdef CHROME_PNG_READ_iCCP_sRGB_cHRM_gAMA
|
| + if (info_ptr != NULL)
|
| + info_ptr->chroma_or_gamma |= PNG_INFO_cHRM;
|
| +#endif
|
| +
|
| if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
|
| #ifdef PNG_READ_sRGB_SUPPORTED
|
| && !(info_ptr->valid & PNG_INFO_sRGB)
|
|
|