Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons properly optimize drawing stretches of blanks...
details: https://anonhg.NetBSD.org/src/rev/faa8409dc619
branches: trunk
changeset: 353273:faa8409dc619
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Apr 26 21:03:52 2017 +0000
description:
properly optimize drawing stretches of blanks that are interrupted only by
a change in background colour or flags
diffstat:
sys/dev/wscons/wsdisplay_vcons.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 0887bcf10774 -r faa8409dc619 sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c Wed Apr 26 18:20:01 2017 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c Wed Apr 26 21:03:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vcons.c,v 1.35 2015/11/08 16:49:20 christos Exp $ */
+/* $NetBSD: wsdisplay_vcons.c,v 1.36 2017/04/26 21:03:52 macallan Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.35 2015/11/08 16:49:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.36 2017/04/26 21:03:52 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -421,7 +421,7 @@
int i, j, offset, boffset = 0, start = -1;
mask = 0x00ff00ff; /* background and flags */
- cmp = -1; /* never match anything */
+ cmp = 0xffffffff; /* never match anything */
vcons_lock(scr);
if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
@@ -474,11 +474,12 @@
} else if (acmp != last_a) {
/*
* different attr, need to
- * flush
+ * flush & restart
*/
vd->erasecols(ri, i, start,
j - start, last_a);
- start = -1;
+ start = j;
+ last_a = acmp;
}
} else {
if (start != -1) {
Home |
Main Index |
Thread Index |
Old Index