From: Helge Deller <deller@gmx.de>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
Helge Deller <deller@gmx.de>,
Sven Schnelle <svens@stackframe.org>,
qemu-stable@nongnu.org
Subject: [PULL 6/6] hw/display/artist: Fix draw_line() artefacts
Date: Wed, 2 Feb 2022 19:11:39 +0100 [thread overview]
Message-ID: <20220202181139.124485-7-deller@gmx.de> (raw)
In-Reply-To: <20220202181139.124485-1-deller@gmx.de>
From: Sven Schnelle <svens@stackframe.org>
The draw_line() function left artefacts on the screen because it was using the
x/y variables which were incremented in the loop before. Fix it by using the
unmodified x1/x2 variables instead.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/display/artist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 8a9fa482d0..1d877998b9 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -553,10 +553,11 @@ 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);
+ artist_invalidate_lines(buf, x1, x2 - x1);
else
- artist_invalidate_lines(buf, y, dx+1);
+ artist_invalidate_lines(buf, y1 > y2 ? y2 : y1, x2 - x1);
}
static void draw_line_pattern_start(ARTISTState *s)
--
2.34.1
next prev parent reply other threads:[~2022-02-02 19:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 18:11 [PULL 0/6] hppa target updates and fixes Helge Deller
2022-02-02 18:11 ` [PULL 1/6] seabios-hppa: Update SeaBIOS-hppa to VERSION 3 Helge Deller
2022-02-02 18:11 ` [PULL 2/6] hw/hppa: Allow up to 16 emulated CPUs Helge Deller
2022-02-02 18:11 ` [PULL 3/6] hppa: Add support for an emulated TOC/NMI button Helge Deller
2022-02-02 18:11 ` [PULL 4/6] hw/display/artist: rewrite vram access mode handling Helge Deller
2022-02-02 18:11 ` [PULL 5/6] hw/display/artist: Mouse cursor fixes for HP-UX Helge Deller
2022-02-02 18:11 ` Helge Deller [this message]
2022-02-03 15:42 ` [PULL 0/6] hppa target updates and fixes Peter Maydell
2022-02-03 17:59 ` Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220202181139.124485-7-deller@gmx.de \
--to=deller@gmx.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=svens@stackframe.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.