Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Simplify calculation for 12-byte alignment.



details:   https://anonhg.NetBSD.org/src/rev/c58ec546b447
branches:  trunk
changeset: 964556:c58ec546b447
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Aug 07 10:53:41 2019 +0000

description:
Simplify calculation for 12-byte alignment.
No functional changes.

diffstat:

 sys/dev/rasops/rasops.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r b8c7e31394e1 -r c58ec546b447 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Wed Aug 07 10:51:57 2019 +0000
+++ b/sys/dev/rasops/rasops.c   Wed Aug 07 10:53:41 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $        */
+/*      $NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -446,9 +446,9 @@
                        xoff &= ~3;
                } else {
                        /*
-                        * Truncate to word and 24-bit color boundary.
+                        * Truncate to both word and 24-bit color boundary.
                         */
-                       xoff = (xoff / (4 * 3)) * (4 * 3);
+                       xoff -= xoff % 12;
                }
 
                yoff = ((ri->ri_height - ri->ri_emuheight) >> 1) *



Home | Main Index | Thread Index | Old Index