diff options
author | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 05:55:10 +0000 |
---|---|---|
committer | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 05:55:10 +0000 |
commit | 29a984ff619eb0bdd27bc612bed55f6146cce4fe (patch) | |
tree | 705860967def5906cd354cfbebf3e6e15aa8b82e /app/gfx | |
parent | 1255a3e4bb4f30978c79497e4f05db615e197505 (diff) | |
download | chromium_src-29a984ff619eb0bdd27bc612bed55f6146cce4fe.zip chromium_src-29a984ff619eb0bdd27bc612bed55f6146cce4fe.tar.gz chromium_src-29a984ff619eb0bdd27bc612bed55f6146cce4fe.tar.bz2 |
Tweak some things to be compatible with libpng 1.4.
libpng 1.2 should still work too.
BUG=32805
TEST=compiles on tryservers and locally against libpng 1.4
Review URL: http://codereview.chromium.org/569009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/codec/png_codec.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/gfx/codec/png_codec.cc b/app/gfx/codec/png_codec.cc index b0799c6..65b3fec 100644 --- a/app/gfx/codec/png_codec.cc +++ b/app/gfx/codec/png_codec.cc @@ -190,7 +190,7 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) { unsigned long long total_size = static_cast<unsigned long long>(w) * static_cast<unsigned long long>(h); if (total_size > ((1 << 29) - 1)) - longjmp(png_ptr->jmpbuf, 1); + longjmp(png_jmpbuf(png_ptr), 1); state->width = static_cast<int>(w); state->height = static_cast<int>(h); @@ -279,7 +279,7 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) { } } else { NOTREACHED() << "Unknown input channels"; - longjmp(png_ptr->jmpbuf, 1); + longjmp(png_jmpbuf(png_ptr), 1); } if (state->bitmap) { @@ -349,10 +349,7 @@ bool BuildPNGStruct(const unsigned char* input, size_t input_size, if (png_sig_cmp(const_cast<unsigned char*>(input), 0, 8) != 0) return false; - *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - png_voidp_NULL, - png_error_ptr_NULL, - png_error_ptr_NULL); + *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!*png_ptr) return false; @@ -574,9 +571,7 @@ bool PNGCodec::Encode(const unsigned char* input, ColorFormat format, DCHECK(input_color_components * w <= row_byte_width); png_struct* png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - png_voidp_NULL, - png_error_ptr_NULL, - png_error_ptr_NULL); + NULL, NULL, NULL); if (!png_ptr) return false; png_info* info_ptr = png_create_info_struct(png_ptr); |