Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/voyager use rasops_init(0, 0), WSFONT_GLYPH(), FO...



details:   https://anonhg.NetBSD.org/src/rev/afb63660279c
branches:  trunk
changeset: 772671:afb63660279c
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jan 11 16:07:29 2012 +0000

description:
use rasops_init(0,0), WSFONT_GLYPH(), FONT_IS_ALPHA()

diffstat:

 sys/dev/pci/voyager/voyagerfb.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (48 lines):

diff -r c608a10a8a46 -r afb63660279c sys/dev/pci/voyager/voyagerfb.c
--- a/sys/dev/pci/voyager/voyagerfb.c   Wed Jan 11 15:53:32 2012 +0000
+++ b/sys/dev/pci/voyager/voyagerfb.c   Wed Jan 11 16:07:29 2012 +0000
@@ -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 @@
        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 @@
        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_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 |



Home | Main Index | Thread Index | Old Index