Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/rasops make anti-aliased character drawing work on h...
details: https://anonhg.NetBSD.org/src/rev/7f7fe08575c4
branches: trunk
changeset: 782246:7f7fe08575c4
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Oct 23 15:12:59 2012 +0000
description:
make anti-aliased character drawing work on hardware where stride != width * bytes per pixel
diffstat:
sys/dev/rasops/rasops32.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 5b98d878fc28 -r 7f7fe08575c4 sys/dev/rasops/rasops32.c
--- a/sys/dev/rasops/rasops32.c Tue Oct 23 12:23:20 2012 +0000
+++ b/sys/dev/rasops/rasops32.c Tue Oct 23 15:12:59 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops32.c,v 1.24 2012/01/04 17:01:52 macallan Exp $ */
+/* $NetBSD: rasops32.c,v 1.25 2012/10/23 15:12:59 macallan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.24 2012/01/04 17:01:52 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.25 2012/10/23 15:12:59 macallan Exp $");
#include "opt_rasops.h"
@@ -166,6 +166,7 @@
struct rasops_info *ri = (struct rasops_info *)cookie;
struct wsdisplay_font *font = PICK_FONT(ri, uc);
int32_t *dp, *rp, *hp, *hrp;
+ uint8_t *rrp;
u_char *fr;
int x, y, r, g, b, aval;
int r1, g1, b1, r0, g0, b0;
@@ -185,7 +186,8 @@
if (!CHAR_IN_FONT(uc, font))
return;
- rp = (int32_t *)(ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
+ rrp = (ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
+ rp = (int32_t *)rrp;
if (ri->ri_hwbits)
hrp = (int32_t *)(ri->ri_hwbits + row*ri->ri_yscale +
col*ri->ri_xscale);
@@ -223,7 +225,7 @@
b1 = clr[1] & 0xff;
for (y = 0; y < height; y++) {
- dp = rp + ri->ri_width * y;
+ dp = (uint32_t *)(rrp + ri->ri_stride * y);
for (x = 0; x < width; x++) {
aval = *fr;
if (aval == 0) {
Home |
Main Index |
Thread Index |
Old Index