From c76c33ca623202ad8473fd590e934db4bfa38256 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 3 May 2013 14:07:30 +0200 Subject: [PATCH 409/482] * grub-core/video/fb/fbblit.c (grub_video_fbblit_blend_BGR888_RGBA8888): Fix order bug. (grub_video_fbblit_blend_RGB888_RGBA8888): Likewise. --- ChangeLog | 6 ++++++ grub-core/video/fb/fbblit.c | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e8884a..c26b110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2013-05-03 Vladimir Serbinenko + * grub-core/video/fb/fbblit.c (grub_video_fbblit_blend_BGR888_RGBA8888): + Fix order bug. + (grub_video_fbblit_blend_RGB888_RGBA8888): Likewise. + +2013-05-03 Vladimir Serbinenko + * include/grub/gui.h (grub_gfxmenu_timeout_unregister): Free cb descriptor. diff --git a/grub-core/video/fb/fbblit.c b/grub-core/video/fb/fbblit.c index 13e2926..541a0ce 100644 --- a/grub-core/video/fb/fbblit.c +++ b/grub-core/video/fb/fbblit.c @@ -986,11 +986,18 @@ grub_video_fbblit_blend_BGR888_RGBA8888 (struct grub_video_fbblit_info *dst, /* General pixel color blending. */ color = *dstptr; +#ifndef GRUB_CPU_WORDS_BIGENDIAN db = dstptr[0]; - db = (db * (255 - a) + sb * a) / 255; dg = dstptr[1]; - dg = (dg * (255 - a) + sg * a) / 255; dr = dstptr[2]; +#else + dr = dstptr[0]; + dg = dstptr[1]; + db = dstptr[2]; +#endif + + db = (db * (255 - a) + sb * a) / 255; + dg = (dg * (255 - a) + sg * a) / 255; dr = (dr * (255 - a) + sr * a) / 255; } @@ -1145,13 +1152,13 @@ grub_video_fbblit_blend_RGB888_RGBA8888 (struct grub_video_fbblit_info *dst, } #ifndef GRUB_CPU_WORDS_BIGENDIAN - db = dstptr[0]; - dg = dstptr[1]; - dr = dstptr[2]; -#else dr = dstptr[0]; dg = dstptr[1]; db = dstptr[2]; +#else + db = dstptr[0]; + dg = dstptr[1]; + dr = dstptr[2]; #endif dr = (dr * (255 - a) + sr * a) / 255; -- 1.8.2.1