Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Avoid memset to framebuffer.



details:   https://anonhg.NetBSD.org/src/rev/829c8b1312b4
branches:  trunk
changeset: 458054:829c8b1312b4
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Jul 28 12:10:52 2019 +0000

description:
Avoid memset to framebuffer.

XXX
There still remains memset in rasops8.c, which will be removed soon
when putchar_aa functions are factorized.

diffstat:

 sys/dev/rasops/rasops_putchar.h |  14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diffs (47 lines):

diff -r 22201910a620 -r 829c8b1312b4 sys/dev/rasops/rasops_putchar.h
--- a/sys/dev/rasops/rasops_putchar.h   Sun Jul 28 12:06:10 2019 +0000
+++ b/sys/dev/rasops/rasops_putchar.h   Sun Jul 28 12:10:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops_putchar.h,v 1.2 2019/07/28 12:06:10 rin Exp $ */
+/* $NetBSD: rasops_putchar.h,v 1.3 2019/07/28 12:10:52 rin Exp $ */
 
 /* NetBSD: rasops8.c,v 1.41 2019/07/25 03:02:44 rin Exp  */
 /*-
@@ -101,11 +101,6 @@
 
        if (uc == ' ') {
                while (height--) {
-#if RASOPS_DEPTH == 8
-                       memset(rp, clr[0], width);
-                       if (ri->ri_hwbits)
-                               memset(hrp, clr[0], width);
-#else
                        dp = rp;
                        if (ri->ri_hwbits)
                                hp = hrp;
@@ -114,7 +109,6 @@
                                if (ri->ri_hwbits)
                                        SUBST_CLR(hp, 0);
                        }
-#endif
                        rp += ri->ri_stride;
                        if (ri->ri_hwbits)
                                hrp += ri->ri_stride;
@@ -147,17 +141,11 @@
                rp -= (ri->ri_stride << 1);
                if (ri->ri_hwbits)
                        hrp -= (ri->ri_stride << 1);
-#if RASOPS_DEPTH == 8
-               memset(rp, clr[1], width);
-               if (ri->ri_hwbits)
-                       memset(hrp, clr[1], width);
-#else
                while (width--) {
                        SUBST_CLR(rp, 1);
                        if (ri->ri_hwbits)
                                SUBST_CLR(hrp, 1);
                }
-#endif
        }
 }
 



Home | Main Index | Thread Index | Old Index