[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 11/12] hw/display/artist: Fix invalidation of lines in artist_
From: |
Helge Deller |
Subject: |
[PATCH v4 11/12] hw/display/artist: Fix invalidation of lines in artist_draw_line() |
Date: |
Sun, 9 Aug 2020 07:24:01 +0200 |
From: Sven Schnelle <svens@stackframe.org>
The old code didn't invalidate correctly when vertical lines were drawn.
Fix this and move the invalidation out of the loop.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/display/artist.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index e7452623f9..09d8b541f5 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -662,7 +662,6 @@ static void draw_line(ARTISTState *s,
}
if (e > 0) {
- artist_invalidate_lines(buf, y, 1);
y += incy;
e += diago;
} else {
@@ -670,6 +669,10 @@ static void draw_line(ARTISTState *s,
}
x++;
} while (x <= x2 && (max_pix == -1 || --max_pix > 0));
+ if (c1)
+ artist_invalidate_lines(buf, x, dy+1);
+ else
+ artist_invalidate_lines(buf, y, dx+1);
}
static void draw_line_pattern_start(ARTISTState *s)
--
2.21.3
- [PATCH v4 00/12] target-hppa fixes v4, Helge Deller, 2020/08/09
- [PATCH v4 03/12] hw/hppa: Implement proper SeaBIOS version check, Helge Deller, 2020/08/09
- [PATCH v4 02/12] seabios-hppa: Update to SeaBIOS hppa version 1, Helge Deller, 2020/08/09
- [PATCH v4 01/12] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources, Helge Deller, 2020/08/09
- [PATCH v4 07/12] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Helge Deller, 2020/08/09
- [PATCH v4 06/12] hw/display/artist: Check offset in draw_line to avoid buffer over-run, Helge Deller, 2020/08/09
- [PATCH v4 10/12] hw/display/artist: Unbreak size mismatch memory accesses, Helge Deller, 2020/08/09
- [PATCH v4 12/12] hw/display/artist: Fix invalidation of lines near screen border, Helge Deller, 2020/08/09
- [PATCH v4 09/12] hw/display/artist: Prevent out of VRAM buffer accesses, Helge Deller, 2020/08/09
- [PATCH v4 04/12] hw/display/artist.c: fix out of bounds check, Helge Deller, 2020/08/09
- [PATCH v4 11/12] hw/display/artist: Fix invalidation of lines in artist_draw_line(),
Helge Deller <=
- [PATCH v4 05/12] hw/hppa/lasi: Don't abort on invalid IMR value, Helge Deller, 2020/08/09
- [PATCH v4 08/12] Revert "hw/display/artist: Avoid drawing line when nothing to display", Helge Deller, 2020/08/09