Module Name: src Committed By: macallan Date: Sat Dec 24 02:28:50 UTC 2011
Modified Files: src/sys/dev/pci/voyager: voyagerfb.c Log Message: 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 ) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/voyager/voyagerfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/voyager/voyagerfb.c diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.12 src/sys/dev/pci/voyager/voyagerfb.c:1.13 --- src/sys/dev/pci/voyager/voyagerfb.c:1.12 Thu Dec 22 07:42:43 2011 +++ src/sys/dev/pci/voyager/voyagerfb.c Sat Dec 24 02:28:50 2011 @@ -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 @@ voyagerfb_putchar(void *cookie, int row, * 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 @@ voyagerfb_putchar(void *cookie, int row, 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;