aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa/background.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-13 19:00:12 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-13 19:00:12 -0800
commitbc1081b746cc3a224470567990364bf62162b405 (patch)
treec713af8aa792ab2f66a0ef88a56e08a46cde84e1 /com32/lib/sys/vesa/background.c
parent2079650b3e6dbe302fe27e5256fd412894c2f4b9 (diff)
downloadsyslinux-bc1081b746cc3a224470567990364bf62162b405.tar.gz
syslinux-bc1081b746cc3a224470567990364bf62162b405.tar.xz
syslinux-bc1081b746cc3a224470567990364bf62162b405.zip
VESA: move pixel formatting into __vesacon_copy_to_screen()syslinux-3.62-pre5
Make pixel formatting an integral part of __vesacon_copy_to_screen(). In order to cut down on the dispatch overhead, make the formatting functions contain the pixel loop, so we only do indirect dispatch twice per pixel row - once for the formatting and once for copying to the screen.
Diffstat (limited to 'com32/lib/sys/vesa/background.c')
-rw-r--r--com32/lib/sys/vesa/background.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c
index d7a0d019..5794db2e 100644
--- a/com32/lib/sys/vesa/background.c
+++ b/com32/lib/sys/vesa/background.c
@@ -35,7 +35,6 @@
#include <minmax.h>
#include "vesa.h"
#include "video.h"
-#include "fmtpixel.h"
static size_t filesize(FILE *fp)
{
@@ -52,18 +51,12 @@ static size_t filesize(FILE *fp)
aligned dwords. */
static void draw_background_line(int line, int start, int npixels)
{
- uint8_t line_buf[VIDEO_X_SIZE*4], *lbp;
uint32_t *bgptr = &__vesacon_background[line][start];
unsigned int bytes_per_pixel = __vesacon_bytes_per_pixel;
- enum vesa_pixel_format pixel_format = __vesacon_pixel_format;
uint8_t *fbptr = (uint8_t *)__vesa_info.mi.lfb_ptr +
line*__vesa_info.mi.logical_scan + start*bytes_per_pixel;
- lbp = line_buf;
- while (npixels--)
- lbp = format_pixel(lbp, *bgptr++, pixel_format);
-
- __vesacon_copy_to_screen(fbptr, line_buf, lbp-line_buf);
+ __vesacon_copy_to_screen(fbptr, bgptr, npixels);
}
/* This draws the border, then redraws the text area */