diff options
author | 2016-01-27 18:26:31 -0800 | |
---|---|---|
committer | 2016-01-27 18:26:31 -0800 | |
commit | 62358e77c2b8f31c59db0a0179bfed8feaa41929 (patch) | |
tree | 121234c6f12af57490b9fcc59ba3323209da0da4 | |
parent | 1c971faab7b201dfcd71b2d684c79b6aa5c2fafd (diff) |
SkPngFilters: guard with libpng >= 1.5.7
The read_filter array was added in libpng-1.5.7.
No point to these filter methods if we can't plug them into libpng.
TBR=msarett@google.com
NOTRY=true
NOPRESUBMIT=true
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1640933004
Review URL: https://codereview.chromium.org/1640933004
-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 9691f12d4d..155cbacf4d 100644 --- a/src/codec/SkPngCodec.cpp +++ b/src/codec/SkPngCodec.cpp @@ -17,7 +17,8 @@ #include "SkSwizzler.h" #include "SkTemplates.h" -#if defined(__SSE2__) +// png_struct::read_filter[] was added in libpng 1.5.7. +#if defined(__SSE2__) && PNG_LIBPNG_VER >= 10507 #include "pngstruct.h" extern "C" void sk_png_init_filter_functions_sse2(png_structp png, unsigned int bpp) { |