Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci enable font loading and screen resizing, now tha...
details: https://anonhg.NetBSD.org/src/rev/f3edee9ffefd
branches: trunk
changeset: 824359:f3edee9ffefd
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Jun 02 19:35:54 2017 +0000
description:
enable font loading and screen resizing, now that the glyph cache can be
reconfigured whenever needed
diffstat:
sys/dev/pci/machfb.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (64 lines):
diff -r 8cff2b22ee8c -r f3edee9ffefd sys/dev/pci/machfb.c
--- a/sys/dev/pci/machfb.c Fri Jun 02 19:33:51 2017 +0000
+++ b/sys/dev/pci/machfb.c Fri Jun 02 19:35:54 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machfb.c,v 1.93 2017/05/28 05:27:13 macallan Exp $ */
+/* $NetBSD: machfb.c,v 1.94 2017/06/02 19:35:54 macallan Exp $ */
/*
* Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0,
- "$NetBSD: machfb.c,v 1.93 2017/05/28 05:27:13 macallan Exp $");
+ "$NetBSD: machfb.c,v 1.94 2017/06/02 19:35:54 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -66,6 +66,7 @@
#include "opt_wsemul.h"
#include "opt_machfb.h"
+#include "opt_glyphcache.h"
#define MACH64_REG_SIZE 0x800
#define MACH64_REG_OFF 0x7ff800
@@ -275,7 +276,7 @@
NULL,
8, 16,
WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE
- /* | WSSCREEN_RESIZE */,
+ | WSSCREEN_RESIZE ,
NULL
};
@@ -687,8 +688,15 @@
wsfont_init();
+#ifdef GLYPHCACHE_DEBUG
+ /* shrink the screen so we can see part of the glyph cache */
+ sc->sc_my_mode->vdisplay -= 200;
+#endif
+
vcons_init(&sc->vd, sc, &mach64_defaultscreen, &sc->sc_accessops);
sc->vd.init_screen = mach64_init_screen;
+ sc->vd.show_screen_cookie = &sc->sc_gc;
+ sc->vd.show_screen_cb = glyphcache_adapt;
sc->sc_gc.gc_bitblt = mach64_bitblt;
sc->sc_gc.gc_blitcookie = sc;
@@ -800,9 +808,11 @@
#ifdef VCONS_DRAW_INTR
scr->scr_flags |= VCONS_DONT_READ;
#endif
+ scr->scr_flags |= VCONS_LOADFONT;
rasops_init(ri, 0, 0);
- ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE;
+ ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE |
+ WSSCREEN_RESIZE;
rasops_reconfig(ri, sc->sc_my_mode->vdisplay / ri->ri_font->fontheight,
sc->sc_my_mode->hdisplay / ri->ri_font->fontwidth);
Home |
Main Index |
Thread Index |
Old Index