Module Name:    src
Committed By:   macallan
Date:           Wed Jan 11 16:07:29 UTC 2012

Modified Files:
        src/sys/dev/pci/voyager: voyagerfb.c

Log Message:
use rasops_init(0,0), WSFONT_GLYPH(), FONT_IS_ALPHA()


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/voyager/voyagerfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/voyager/voyagerfb.c
diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.15 src/sys/dev/pci/voyager/voyagerfb.c:1.16
--- src/sys/dev/pci/voyager/voyagerfb.c:1.15	Wed Dec 28 18:23:01 2011
+++ src/sys/dev/pci/voyager/voyagerfb.c	Wed Jan 11 16:07:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyagerfb.c,v 1.15 2011/12/28 18:23:01 macallan Exp $	*/
+/*	$NetBSD: voyagerfb.c,v 1.16 2012/01/11 16:07:29 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.15 2011/12/28 18:23:01 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.16 2012/01/11 16:07:29 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -537,7 +537,7 @@ voyagerfb_init_screen(void *cookie, stru
 	ri->ri_flg |= RI_ENABLE_ALPHA;
 #endif
 
-	rasops_init(ri, sc->sc_height / 8, sc->sc_width / 8);
+	rasops_init(ri, 0, 0);
 	ri->ri_caps = WSSCREEN_WSCOLORS;
 
 	rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
@@ -838,7 +838,7 @@ voyagerfb_putchar(void *cookie, int row,
 	struct vcons_screen *scr = ri->ri_hw;
 	struct voyagerfb_softc *sc = scr->scr_cookie;
 	uint32_t cmd;
-	int fg, bg, uc;
+	int fg, bg;
 	uint8_t *data;
 	int x, y, wi, he;
 
@@ -859,9 +859,8 @@ voyagerfb_putchar(void *cookie, int row,
 		voyagerfb_rectfill(sc, x, y, wi, he, bg);
 		return;
 	}
-	uc = c - font->firstchar;
-	data = (uint8_t *)font->data + uc * ri->ri_fontscale;
-	if (font->stride < font->fontwidth) {
+	data = WSFONT_GLYPH(c, font);
+	if (!FONT_IS_ALPHA(font)) {
 		/* this is a mono font */
 		cmd = ROP_COPY |
 		      SM502_CTRL_USE_ROP2 |

Reply via email to