aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa/drawtxt.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/drawtxt.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/drawtxt.c')
-rw-r--r--com32/lib/sys/vesa/drawtxt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/com32/lib/sys/vesa/drawtxt.c b/com32/lib/sys/vesa/drawtxt.c
index 9e222ecc..023c3646 100644
--- a/com32/lib/sys/vesa/drawtxt.c
+++ b/com32/lib/sys/vesa/drawtxt.c
@@ -29,7 +29,6 @@
#include <colortbl.h>
#include "vesa.h"
#include "video.h"
-#include "fmtpixel.h"
#include "fill.h"
/*
@@ -84,7 +83,7 @@ static void vesacon_update_characters(int row, int col, int nrows, int ncols)
struct vesa_char *rowptr, *rowsptr, *cptr, *csptr;
unsigned int bytes_per_pixel = __vesacon_bytes_per_pixel;
unsigned long pixel_offset;
- uint8_t row_buffer[VIDEO_X_SIZE*4], *rowbufptr;
+ uint32_t row_buffer[VIDEO_X_SIZE], *rowbufptr;
uint8_t *fbrowptr;
uint8_t sha;
@@ -174,14 +173,11 @@ static void vesacon_update_characters(int row, int col, int nrows, int ncols)
color &= 0x3f3f3f;
}
- rowbufptr = format_pixel(rowbufptr, color, __vesacon_pixel_format);
+ *rowbufptr++ = color;
}
/* Copy to frame buffer */
- /* Note that the dword_count is rounded down, not up. That's because
- the row_buffer includes a spillover pixel. */
- __vesacon_copy_to_screen(fbrowptr, row_buffer,
- (rowbufptr-row_buffer) & ~3);
+ __vesacon_copy_to_screen(fbrowptr, row_buffer, rowbufptr-row_buffer);
bgrowptr += VIDEO_X_SIZE;
fbrowptr += __vesa_info.mi.logical_scan;