aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-12-10 08:54:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-10 08:54:36 -0800
commit04a0d3f00ec758b376b404b8370aeabdc4529ca0 (patch)
tree3feeb2315937782d98d7b026943c1163f1e83b60
parent201efb5ae00828f85bb16d63580898961e4085ce (diff)
Silence another PNG print statement
It can still be turned on by using setting c_suppressPNGImageDecoderWarnings to true. Review URL: https://codereview.chromium.org/1512293003
-rw-r--r--src/images/SkImageDecoder_libpng.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp
index 2dead58729..6acbf29d8c 100644
--- a/src/images/SkImageDecoder_libpng.cpp
+++ b/src/images/SkImageDecoder_libpng.cpp
@@ -128,7 +128,9 @@ static int sk_read_user_chunk(png_structp png_ptr, png_unknown_chunkp chunk) {
#endif
static void sk_error_fn(png_structp png_ptr, png_const_charp msg) {
- SkDEBUGF(("------ png error %s\n", msg));
+ if (!c_suppressPNGImageDecoderWarnings) {
+ SkDEBUGF(("------ png error %s\n", msg));
+ }
longjmp(png_jmpbuf(png_ptr), 1);
}