diff options
author | Leon Scroggins III <scroggo@google.com> | 2018-03-01 15:57:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-01 21:23:04 +0000 |
commit | 9b1a8860611e17fd25c0d322ef4d28cfa601e82e (patch) | |
tree | 57cbe4f527c5d9e12500b0484cae137fa6c1f0f1 /src | |
parent | c57c41e8aa1f4b3d14412142210ba282e734bded (diff) |
Fix fuschia roll
Only call png_set_option ifdef PNG_SET_OPTION_SUPPORTED.
Change-Id: Ib3d03e15b12b6229f98544b195a6bc32b5aa2f0f
Reviewed-on: https://skia-review.googlesource.com/111601
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/codec/SkPngCodec.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp index df22121b4c..31a407c670 100644 --- a/src/codec/SkPngCodec.cpp +++ b/src/codec/SkPngCodec.cpp @@ -22,7 +22,6 @@ #include "SkTemplates.h" #include "SkUtils.h" -#define PNG_SET_OPTION_SUPPORTED #include "png.h" #include <algorithm> @@ -788,9 +787,11 @@ static SkCodec::Result read_header(SkStream* stream, SkPngChunkReader* chunkRead return SkCodec::kInternalError; } +#ifdef PNG_SET_OPTION_SUPPORTED // This setting ensures that we display images with incorrect CMF bytes. // See crbug.com/807324. png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON); +#endif AutoCleanPng autoClean(png_ptr, stream, chunkReader, outCodec); |