All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>,
	Sven Schnelle <svens@stackframe.org>,
	Richard Henderson <rth@twiddle.net>
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	[thread overview]
Message-ID: <20200809052402.31641-12-deller@gmx.de> (raw)
In-Reply-To: <20200809052402.31641-1-deller@gmx.de>

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



  parent reply	other threads:[~2020-08-09  5:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-09  5:23 [PATCH v4 00/12] target-hppa fixes v4 Helge Deller
2020-08-09  5:23 ` [PATCH v4 01/12] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources Helge Deller
2020-08-09  5:23 ` [PATCH v4 02/12] seabios-hppa: Update to SeaBIOS hppa version 1 Helge Deller
2020-08-09  5:23 ` [PATCH v4 03/12] hw/hppa: Implement proper SeaBIOS version check Helge Deller
2020-08-09  5:23 ` [PATCH v4 04/12] hw/display/artist.c: fix out of bounds check Helge Deller
2020-08-09  5:23 ` [PATCH v4 05/12] hw/hppa/lasi: Don't abort on invalid IMR value Helge Deller
2020-08-09  5:23 ` [PATCH v4 06/12] hw/display/artist: Check offset in draw_line to avoid buffer over-run Helge Deller
2020-08-09  5:23 ` [PATCH v4 07/12] hw/display/artist: Refactor artist_rop8() " Helge Deller
2020-08-09  5:23 ` [PATCH v4 08/12] Revert "hw/display/artist: Avoid drawing line when nothing to display" Helge Deller
2020-08-09  5:23 ` [PATCH v4 09/12] hw/display/artist: Prevent out of VRAM buffer accesses Helge Deller
2020-08-09  5:24 ` [PATCH v4 10/12] hw/display/artist: Unbreak size mismatch memory accesses Helge Deller
2020-08-09  5:24 ` Helge Deller [this message]
2020-08-09  5:24 ` [PATCH v4 12/12] hw/display/artist: Fix invalidation of lines near screen border 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=20200809052402.31641-12-deller@gmx.de \
    --to=deller@gmx.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --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.