summaryrefslogtreecommitdiffstats
path: root/minui/resources.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-02-12 20:30:32 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-12 20:30:32 +0100
commit2622ee3efb89c2bb67abf4d1199cd8f158bb1138 (patch)
tree09bc2c070ee8b84bcd07d3f479283083dc69c665 /minui/resources.c
parentam adf71bf7: am 5db3f978: Merge "Fix build when TARGET_USERIMAGES_USE_EXT4 is not defined" (diff)
parentam ff934d02: Merge "Fix Droid and animation color in recovery mode" (diff)
downloadandroid_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar.gz
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar.bz2
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar.lz
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar.xz
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.tar.zst
android_bootable_recovery-2622ee3efb89c2bb67abf4d1199cd8f158bb1138.zip
Diffstat (limited to 'minui/resources.c')
-rw-r--r--minui/resources.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/minui/resources.c b/minui/resources.c
index f645c4b67..886c3255d 100644
--- a/minui/resources.c
+++ b/minui/resources.c
@@ -216,6 +216,10 @@ int res_create_display_surface(const char* name, gr_surface* pSurface) {
goto exit;
}
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row = malloc(width * 4);
unsigned int y;
for (y = 0; y < height; ++y) {
@@ -279,6 +283,10 @@ int res_create_multi_display_surface(const char* name, int* frames, gr_surface**
}
}
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row = malloc(width * 4);
unsigned int y;
for (y = 0; y < height; ++y) {
@@ -334,6 +342,10 @@ int res_create_alpha_surface(const char* name, gr_surface* pSurface) {
surface->row_bytes = width;
surface->pixel_bytes = 1;
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row;
unsigned int y;
for (y = 0; y < height; ++y) {