Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons When font is switched, not only putchar, but ...



details:   https://anonhg.NetBSD.org/src/rev/2aa56142ea14
branches:  trunk
changeset: 964403:2aa56142ea14
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jul 31 14:29:54 2019 +0000

description:
When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:

https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58

diffstat:

 sys/dev/wscons/wsdisplay_vcons.c |  21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r a2516467b783 -r 2aa56142ea14 sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c  Wed Jul 31 11:02:49 2019 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c  Wed Jul 31 14:29:54 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsdisplay_vcons.c,v 1.39 2018/12/01 00:28:45 msaitoh Exp $ */
+/*     $NetBSD: wsdisplay_vcons.c,v 1.40 2019/07/31 14:29:54 rin Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.39 2018/12/01 00:28:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.40 2019/07/31 14:29:54 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -430,8 +430,23 @@
        /* allocate new buffers */
        vcons_alloc_buffers(vd, scr);
        
-       /* save the potentially changed putchar */ 
+       /* save the potentially changed ri_ops */ 
+       vd->eraserows = ri->ri_ops.eraserows;
+       vd->erasecols = ri->ri_ops.erasecols;
        scr->putchar   = ri->ri_ops.putchar;
+       vd->cursor    = ri->ri_ops.cursor;
+
+       if (scr->scr_flags & VCONS_NO_COPYCOLS) {
+               vd->copycols  = vcons_copycols_noread;
+       } else {
+               vd->copycols = ri->ri_ops.copycols;
+       }
+
+       if (scr->scr_flags & VCONS_NO_COPYROWS) {
+               vd->copyrows  = vcons_copyrows_noread;
+       } else {
+               vd->copyrows = ri->ri_ops.copyrows;
+       }
 
        /* and put our wrappers back */
        ri->ri_ops.eraserows = vcons_eraserows; 



Home | Main Index | Thread Index | Old Index