* grub-core/video/fb/fbblit.c (grub_video_fbblit_blend_BGR888_RGBA8888):
Fix order bug. (grub_video_fbblit_blend_RGB888_RGBA8888): Likewise.
This commit is contained in:
parent
7c332bdc98
commit
cff501187c
2 changed files with 19 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-05-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* 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 <phcoder@gmail.com>
|
2013-05-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* include/grub/gui.h (grub_gfxmenu_timeout_unregister): Free cb
|
* include/grub/gui.h (grub_gfxmenu_timeout_unregister): Free cb
|
||||||
|
|
|
@ -986,11 +986,18 @@ grub_video_fbblit_blend_BGR888_RGBA8888 (struct grub_video_fbblit_info *dst,
|
||||||
/* General pixel color blending. */
|
/* General pixel color blending. */
|
||||||
color = *dstptr;
|
color = *dstptr;
|
||||||
|
|
||||||
|
#ifndef GRUB_CPU_WORDS_BIGENDIAN
|
||||||
db = dstptr[0];
|
db = dstptr[0];
|
||||||
db = (db * (255 - a) + sb * a) / 255;
|
|
||||||
dg = dstptr[1];
|
dg = dstptr[1];
|
||||||
dg = (dg * (255 - a) + sg * a) / 255;
|
|
||||||
dr = dstptr[2];
|
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;
|
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
|
#ifndef GRUB_CPU_WORDS_BIGENDIAN
|
||||||
db = dstptr[0];
|
|
||||||
dg = dstptr[1];
|
|
||||||
dr = dstptr[2];
|
|
||||||
#else
|
|
||||||
dr = dstptr[0];
|
dr = dstptr[0];
|
||||||
dg = dstptr[1];
|
dg = dstptr[1];
|
||||||
db = dstptr[2];
|
db = dstptr[2];
|
||||||
|
#else
|
||||||
|
db = dstptr[0];
|
||||||
|
dg = dstptr[1];
|
||||||
|
dr = dstptr[2];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dr = (dr * (255 - a) + sr * a) / 255;
|
dr = (dr * (255 - a) + sr * a) / 255;
|
||||||
|
|
Loading…
Reference in a new issue