Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/voyager don't put alpha values in a variable nam...



details:   https://anonhg.NetBSD.org/src/rev/4133d767fdd4
branches:  trunk
changeset: 772206:4133d767fdd4
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Dec 24 02:28:50 2011 +0000

description:
don't put alpha values in a variable named alpha since alpha doesn't like
variables conflicting with platform names
( just in case someone figures out how to stick an sm50x into an alpha )

diffstat:

 sys/dev/pci/voyager/voyagerfb.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (43 lines):

diff -r 7d6da9692abc -r 4133d767fdd4 sys/dev/pci/voyager/voyagerfb.c
--- a/sys/dev/pci/voyager/voyagerfb.c   Sat Dec 24 02:13:21 2011 +0000
+++ b/sys/dev/pci/voyager/voyagerfb.c   Sat Dec 24 02:28:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.12 2011/12/22 07:42:43 macallan Exp $  */
+/*     $NetBSD: voyagerfb.c,v 1.13 2011/12/24 02:28:50 macallan Exp $  */
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.12 2011/12/22 07:42:43 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.13 2011/12/24 02:28:50 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -897,7 +897,7 @@
                         * we can at least use a host blit to go through the
                         * pipeline instead of having to sync the engine
                         */
-                       int i, r, g, b, alpha;
+                       int i, r, g, b, aval;
                        int rf, gf, bf, rb, gb, bb;
                        uint32_t pixel;
 
@@ -921,11 +921,11 @@
                        bf =  fg & 0xff;
                        bb =  bg & 0xff;
                        for (i = 0; i < wi * he; i++) {
-                               alpha = *data;
+                               aval = *data;
                                data++;
-                               r = alpha * rf + (255 - alpha) * rb;
-                               g = alpha * gf + (255 - alpha) * gb;
-                               b = alpha * bf + (255 - alpha) * bb;
+                               r = aval * rf + (255 - aval) * rb;
+                               g = aval * gf + (255 - aval) * gb;
+                               b = aval * bf + (255 - aval) * bb;
                                pixel = (r & 0xff00) << 8 |
                                        (g & 0xff00) |
                                        (b & 0xff00) >> 8;



Home | Main Index | Thread Index | Old Index