Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-suncg14/dist/src draw very narrow ...
details: https://anonhg.NetBSD.org/xsrc/rev/1298fdd118f7
branches: trunk
changeset: 10821:1298fdd118f7
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Dec 03 06:10:07 2021 +0000
description:
draw very narrow rectangles correctly
diffstat:
external/mit/xf86-video-suncg14/dist/src/cg14_accel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 773b22828fee -r 1298fdd118f7 external/mit/xf86-video-suncg14/dist/src/cg14_accel.c
--- a/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Thu Dec 02 22:53:43 2021 +0000
+++ b/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Fri Dec 03 06:10:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_accel.c,v 1.16 2021/12/02 22:35:26 macallan Exp $ */
+/* $NetBSD: cg14_accel.c,v 1.17 2021/12/03 06:10:07 macallan Exp $ */
/*
* Copyright (c) 2013 Michael Lorenz
* All rights reserved.
@@ -594,10 +594,12 @@
for (line = 0; line < h; line++) {
ptr = start;
cnt = w;
+ pre = min(pre, cnt);
if (pre) {
write_sx_io(p, ptr & ~7, SX_STBS(8, pre - 1, ptr & 7));
ptr += pre;
cnt -= pre;
+ if (cnt == 0) goto next;
}
/* now do the aligned pixels in 32bit chunks */
if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr);
@@ -612,6 +614,7 @@
write_sx_io(p, ptr & ~7, SX_STBS(8, cnt - 1, ptr & 7));
}
if ((ptr + cnt) != (start + w)) xf86Msg(X_ERROR, "%s %x vs %x\n", __func__, ptr + cnt, start + w);
+next:
start += pitch;
}
} else if (p->last_rop == 0xaa) {
Home |
Main Index |
Thread Index |
Old Index