Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 14645018: Support for libpng > 1.2. (Closed)

Created:
7 years, 7 months ago by fmalita_google_do_not_use
Modified:
7 years, 7 months ago
Reviewers:
scroggo, djsollen, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Support for libpng > 1.2. * Add conditional defines for deprecated NULL type casts. * Use wrapper functions for accessing png_structp & png_infop fields (direct access is deprecated). Tested on Fedora 17 (libpng 1.5) and Ubuntu 12.04 (libpng 1.2). Note: there is one png_structp direct field acces left in SkPNGImageDecoder::onDecodeRegion() for which libpng does not provide a wrapper method (png_ptr->pass = 0). That should be OK for now as the code is only enabled when SK_BUILD_FOR_ANDROID is set, and the Android libpng version is striclty controlled. But it may become an issue in the future when/if Android decides to update libpng, so we should investigate a solution. R=scroggo@google.com Committed: http://code.google.com/p/skia/source/detail?r=8956

Patch Set 1 #

Total comments: 5

Patch Set 2 : Avoid touching png_ptr->pass on Android w/ libpng > 1.2. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -11 lines) Patch
M src/images/SkImageDecoder_libpng.cpp View 1 7 chunks +35 lines, -11 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
fmalita_google_do_not_use
7 years, 7 months ago (2013-05-01 15:46:51 UTC) #1
scroggo
https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp#newcode260 src/images/SkImageDecoder_libpng.cpp:260: png_set_expand_gray_1_2_4_to_8(png_ptr); Recently Derek upstreamed changes from Android that changed ...
7 years, 7 months ago (2013-05-01 16:09:52 UTC) #2
fmalita_google_do_not_use
https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp#newcode260 src/images/SkImageDecoder_libpng.cpp:260: png_set_expand_gray_1_2_4_to_8(png_ptr); On 2013/05/01 16:09:53, scroggo wrote: > It appears ...
7 years, 7 months ago (2013-05-01 16:20:44 UTC) #3
scroggo
https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/14645018/diff/1/src/images/SkImageDecoder_libpng.cpp#newcode730 src/images/SkImageDecoder_libpng.cpp:730: // and no wrapper method is provided for resetting ...
7 years, 7 months ago (2013-05-01 17:35:03 UTC) #4
scroggo
lgtm
7 years, 7 months ago (2013-05-02 00:01:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/fmalita@google.com/14645018/11001
7 years, 7 months ago (2013-05-02 13:33:19 UTC) #6
commit-bot: I haz the power
Change committed as 8956
7 years, 7 months ago (2013-05-02 13:41:37 UTC) #7
scroggo
7 years, 7 months ago (2013-05-02 15:06:37 UTC) #8
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/14645018/diff/11001/src/images/SkImage...
File src/images/SkImageDecoder_libpng.cpp (right):

https://chromiumcodereview.appspot.com/14645018/diff/11001/src/images/SkImage...
src/images/SkImageDecoder_libpng.cpp:732: png_ptr->pass = 0;
There is a function call png_set_interlaced_pass, which sets png_ptr->pass. It
also sets png_ptr->iwidth, which is probably the correct thing to do, but I'm
not sure yet.

Powered by Google App Engine
This is Rietveld 408576698