diff options
author | Tony Kuo <tony.kuo@mediatek.com> | 2015-02-05 21:25:56 +0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-11 21:36:00 -0800 |
commit | fd778e3e406a7e83536ea66776996f032f24af64 (patch) | |
tree | 8b73303ffaa0aa3087367b11748b5b16f5ee2ab0 /minui/resources.c | |
parent | 5db3f97877c0aafd4513c3ed846c48b0fc148b0e (diff) | |
download | bootable_recovery-fd778e3e406a7e83536ea66776996f032f24af64.tar.gz bootable_recovery-fd778e3e406a7e83536ea66776996f032f24af64.tar.bz2 bootable_recovery-fd778e3e406a7e83536ea66776996f032f24af64.zip |
Fix Droid and animation color in recovery mode
[Problem]
Droid and animation color in recovery mode are incorrect
[Modify]
- Add support for flipping (zero copy) with RECOVERY_ABGR.
- Decodes PNG files to BGRA directly, and other fills, text and alpha blending are also done directly in BGRA (i.e. blits can still bypass conversion)
- Remove the BGRA workaround added previous for single buffer mode (f766396)
Bug:19216535
Change-Id: Ie864419fc6da776ff58b2d02e130f203c194500f
Signed-off-by: Tony Kuo <tony.kuo@mediatek.com>
Diffstat (limited to 'minui/resources.c')
-rw-r--r-- | minui/resources.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/minui/resources.c b/minui/resources.c index f645c4b..886c325 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) { |