Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops When clearing the entire display, point to th...



details:   https://anonhg.NetBSD.org/src/rev/c73ee18d8e0d
branches:  trunk
changeset: 475778:c73ee18d8e0d
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Aug 25 08:45:25 1999 +0000

description:
When clearing the entire display, point to the start of the framebuffer,
not start of console output. Also, do not advance by ri_delta every row.

diffstat:

 sys/dev/rasops/rasops.c   |  13 ++++++++-----
 sys/dev/rasops/rasops24.c |  16 +++++++++-------
 2 files changed, 17 insertions(+), 12 deletions(-)

diffs (121 lines):

diff -r 5a254a4a54f4 -r c73ee18d8e0d sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Wed Aug 25 07:56:22 1999 +0000
+++ b/sys/dev/rasops/rasops.c   Wed Aug 25 08:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.13 1999/08/24 11:07:32 ad Exp $ */
+/*      $NetBSD: rasops.c,v 1.14 1999/08/25 08:45:25 ad Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.13 1999/08/24 11:07:32 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.14 1999/08/25 08:45:25 ad Exp $");
 
 #include "rasops_glue.h"
 
@@ -712,7 +712,7 @@
        long attr;
 {
        struct rasops_info *ri;
-       int np, nw, cnt;
+       int np, nw, cnt, delta;
        int32_t *dp, clr;
        
        ri = (struct rasops_info *)cookie;
@@ -731,7 +731,6 @@
 #endif
 
        clr = ri->ri_devcmap[(attr >> 16) & 15];
-       dp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale);
 
        /* 
         * XXX the wsdisplay_emulops interface seems a little deficient in
@@ -743,10 +742,14 @@
                np = ri->ri_stride >> 5;
                nw = (ri->ri_stride >> 2) & 7;
                num = ri->ri_height;
+               dp = (int32_t *)ri->ri_origbits;
+               delta = 0;
        } else {
                np = ri->ri_emustride >> 5;
                nw = (ri->ri_emustride >> 2) & 7;
                num *= ri->ri_font->fontheight;
+               dp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale);
+               delta = ri->ri_delta;
        }
        
        while (num--) {
@@ -767,7 +770,7 @@
                        DELTA(dp, 4, int32_t *);
                } 
                        
-               DELTA(dp, ri->ri_delta, int32_t *);
+               DELTA(dp, delta, int32_t *);
        }
 }
 
diff -r 5a254a4a54f4 -r c73ee18d8e0d sys/dev/rasops/rasops24.c
--- a/sys/dev/rasops/rasops24.c Wed Aug 25 07:56:22 1999 +0000
+++ b/sys/dev/rasops/rasops24.c Wed Aug 25 08:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rasops24.c,v 1.7 1999/08/24 11:07:32 ad Exp $ */
+/*     $NetBSD: rasops24.c,v 1.8 1999/08/25 08:45:25 ad Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include "opt_rasops.h"
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.7 1999/08/24 11:07:32 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.8 1999/08/25 08:45:25 ad Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -557,9 +557,9 @@
        int row, num;
        long attr;
 {
-       struct rasops_info *ri;
+       int n9, n3, n1, cnt, stride, delta;
        u_int32_t *dp, clr, stamp[3];
-       int n9, n3, n1, cnt, stride;
+       struct rasops_info *ri;
        
        /* 
         * If the color is gray, we can cheat and use the generic routines
@@ -600,8 +600,6 @@
                stamp[2] = bswap32(stamp[2]);
        }
 
-       dp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale);
-
        /* 
         * XXX the wsdisplay_emulops interface seems a little deficient in
         * that there is no way to clear the *entire* screen. We provide a 
@@ -611,9 +609,13 @@
        if (num == ri->ri_rows && (ri->ri_flg & RI_FULLCLEAR) != 0) {
                stride = ri->ri_stride;
                num = ri->ri_height;
+               dp = (int32_t *)ri->ri_origbits;
+               delta = 0;
        } else {
                stride = ri->ri_emustride;
                num *= ri->ri_font->fontheight;
+               dp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale);
+               delta = ri->ri_delta;
        }
 
        n9 = stride / 36;
@@ -646,7 +648,7 @@
                for (cnt = 0; cnt < n1; cnt++)
                        *dp++ = stamp[cnt];
                                
-               DELTA(dp, ri->ri_delta, int32_t *);
+               DELTA(dp, delta, int32_t *);
        }
 }
 



Home | Main Index | Thread Index | Old Index