Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/tc Fill always erased regions with bg color. Fix an...



details:   https://anonhg.NetBSD.org/src/rev/c59041b78222
branches:  trunk
changeset: 477573:c59041b78222
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Fri Oct 22 07:42:05 1999 +0000

description:
Fill always erased regions with bg color.  Fix an issue revealed by
"print -n '\033[7m'; ls".

diffstat:

 sys/dev/tc/sfb.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r 0f93866f0a6b -r c59041b78222 sys/dev/tc/sfb.c
--- a/sys/dev/tc/sfb.c  Fri Oct 22 05:19:56 1999 +0000
+++ b/sys/dev/tc/sfb.c  Fri Oct 22 07:42:05 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.21 1999/10/19 09:51:17 nisimura Exp $ */
+/* $NetBSD: sfb.c,v 1.22 1999/10/22 07:42:05 nisimura Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.21 1999/10/19 09:51:17 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.22 1999/10/22 07:42:05 nisimura Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1087,9 +1087,15 @@
        width = w + align;
        align = (long)dp & SFBALIGNMASK;
        dp -= align;
+       shift = align - shift; 
+#if 1
+       if (shift < 0) {
+               align += 8;
+               dp -= 8;
+       }
+#endif
        lmask = SFBCOPYALL1 << align;
        rmask = SFBCOPYALL1 >> (-(w + align) & SFBCOPYBITMASK);
-       shift = align - shift; 
        sfb = rap->data;
 
        SFBMODE(sfb, MODE_COPY);
@@ -1204,11 +1210,10 @@
        lmask = SFBSTIPPLEALL1 << align;
        rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK);
        sfb = rap->data;
-       attr = (attr != 0) ^ (rc->rc_bits & RC_INVERT);
 
        SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE);
        SFBPLANEMASK(sfb, ~0);
-       SFBFG(sfb, (attr == 0) ? 0 : 0x01010101);
+       SFBFG(sfb, 0);                          /* fill with bg color */
        if (width <= SFBSTIPPLEBITS) {
                lmask = lmask & rmask;
                while (height > 0) {
@@ -1337,11 +1342,10 @@
        lmask = SFBSTIPPLEALL1 << align;
        rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK);
        sfb = rap->data;
-       attr = (attr != 0) ^ (rc->rc_bits & RC_INVERT);
 
        SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE);
        SFBPLANEMASK(sfb, ~0);
-       SFBFG(sfb, (attr == 0) ? 0 : 0x01010101);
+       SFBFG(sfb, 0);                          /* fill with bg color */
        if (width <= SFBSTIPPLEBITS) {
                /* never happens */;
        }



Home | Main Index | Thread Index | Old Index