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 RI_CENTER and RI_FULLCLEAR work with a s...
details: https://anonhg.NetBSD.org/src/rev/b478e44e863e
branches: trunk
changeset: 751004:b478e44e863e
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Jan 21 05:32:18 2010 +0000
description:
make RI_CENTER and RI_FULLCLEAR work with a shadow framebuffer
diffstat:
sys/dev/rasops/rasops.c | 14 ++++++++++----
sys/dev/rasops/rasops.h | 3 ++-
2 files changed, 12 insertions(+), 5 deletions(-)
diffs (65 lines):
diff -r 8efde57238a6 -r b478e44e863e sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c Thu Jan 21 04:40:22 2010 +0000
+++ b/sys/dev/rasops/rasops.c Thu Jan 21 05:32:18 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.60 2009/03/14 21:04:22 dsl Exp $ */
+/* $NetBSD: rasops.c,v 1.61 2010/01/21 05:32:18 macallan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.60 2009/03/14 21:04:22 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.61 2010/01/21 05:32:18 macallan Exp $");
#include "opt_rasops.h"
#include "rasops_glue.h"
@@ -283,13 +283,19 @@
/* Now centre our window if needs be */
ri->ri_origbits = ri->ri_bits;
+ ri->ri_hworigbits = ri->ri_hwbits;
if ((ri->ri_flg & RI_CENTER) != 0) {
ri->ri_bits += (((ri->ri_width * bpp >> 3) -
ri->ri_emustride) >> 1) & ~3;
ri->ri_bits += ((ri->ri_height - ri->ri_emuheight) >> 1) *
ri->ri_stride;
-
+ if (ri->ri_hwbits != NULL) {
+ ri->ri_hwbits += (((ri->ri_width * bpp >> 3) -
+ ri->ri_emustride) >> 1) & ~3;
+ ri->ri_hwbits += ((ri->ri_height - ri->ri_emuheight) >> 1) *
+ ri->ri_stride;
+ }
ri->ri_yorigin = (int)(ri->ri_bits - ri->ri_origbits)
/ ri->ri_stride;
ri->ri_xorigin = (((int)(ri->ri_bits - ri->ri_origbits)
@@ -827,7 +833,7 @@
num = ri->ri_height;
dp = (int32_t *)ri->ri_origbits;
if (ri->ri_hwbits)
- hp = (int32_t *)ri->ri_hwbits;
+ hp = (int32_t *)ri->ri_hworigbits;
delta = 0;
} else {
np = ri->ri_emustride >> 5;
diff -r 8efde57238a6 -r b478e44e863e sys/dev/rasops/rasops.h
--- a/sys/dev/rasops/rasops.h Thu Jan 21 04:40:22 2010 +0000
+++ b/sys/dev/rasops/rasops.h Thu Jan 21 05:32:18 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.h,v 1.22 2008/04/28 20:23:56 martin Exp $ */
+/* $NetBSD: rasops.h,v 1.23 2010/01/21 05:32:18 macallan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -94,6 +94,7 @@
int ri_xscale; /* fontwidth * pelbytes */
int ri_yscale; /* fontheight * stride */
u_char *ri_origbits; /* where screen bits actually start */
+ u_char *ri_hworigbits; /* where hw bits actually start */
int ri_xorigin; /* where ri_bits begins (x) */
int ri_yorigin; /* where ri_bits begins (y) */
int32_t ri_devcmap[16]; /* color -> framebuffer data */
Home |
Main Index |
Thread Index |
Old Index