aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yang <chao.yang@linaro.org>2011-11-14 14:23:22 +0000
committerChao Yang <chao.yang@linaro.org>2011-11-14 14:23:22 +0000
commit5632fbf4e73f2c7f82563e000340838c2fb1a4dc (patch)
tree76e7810f286dde90c06180a94f90179dd1f8b915
parent7172eb7b623f4b30f5a709d639fcd3fb51cd6220 (diff)
downloadrecovery-linaro_android_2.3.7.tar.gz
recovery: update interfaces to libpng 1.5.7 beta 01linaro_android_2.3.7linaro_android_2.3.5
Libpng 1.5.7 beta 01 is integrated, where some interfaces are changed and some structures are not visible to libpng clients any more. The structure information can be retrieved through specific interfaces. libpng.a needs to be linked with libm.a. Change-Id: I08e9410108a79a0fc5b0c80e6852a7cbf5991f5e
-rw-r--r--Android.mk2
-rw-r--r--minui/resources.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk
index e6c35475..12fda997 100644
--- a/Android.mk
+++ b/Android.mk
@@ -35,7 +35,7 @@ ifeq ($(TARGET_RECOVERY_UI_LIB),)
else
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
-LOCAL_STATIC_LIBRARIES += libext4_utils libz
+LOCAL_STATIC_LIBRARIES += libext4_utils libz libm
LOCAL_STATIC_LIBRARIES += libminzip libunz libmtdutils libmincrypt
LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils
LOCAL_STATIC_LIBRARIES += libstdc++ libc
diff --git a/minui/resources.c b/minui/resources.c
index 3d2c727f..1c489164 100644
--- a/minui/resources.c
+++ b/minui/resources.c
@@ -89,14 +89,14 @@ int res_create_surface(const char* name, gr_surface* pSurface) {
png_set_sig_bytes(png_ptr, sizeof(header));
png_read_info(png_ptr, info_ptr);
- size_t width = info_ptr->width;
- size_t height = info_ptr->height;
+ size_t width = png_get_image_width(png_ptr, info_ptr);
+ size_t height = png_get_image_height(png_ptr, info_ptr);
size_t stride = 4 * width;
size_t pixelSize = stride * height;
- int color_type = info_ptr->color_type;
- int bit_depth = info_ptr->bit_depth;
- int channels = info_ptr->channels;
+ int color_type = png_get_color_type(png_ptr, info_ptr);
+ int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+ int channels = png_get_channels(png_ptr, info_ptr);
if (!(bit_depth == 8 &&
((channels == 3 && color_type == PNG_COLOR_TYPE_RGB) ||
(channels == 4 && color_type == PNG_COLOR_TYPE_RGBA) ||