From patchwork Wed Aug 26 21:13:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 11739637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0115713B1 for ; Wed, 26 Aug 2020 21:23:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBB4120737 for ; Wed, 26 Aug 2020 21:23:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Lr0Iw6Qf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBB4120737 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB2sx-0005aS-Td for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Aug 2020 17:23:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB2k6-0008P0-VA for qemu-devel@nongnu.org; Wed, 26 Aug 2020 17:14:02 -0400 Received: from mout.gmx.net ([212.227.17.21]:49511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB2k1-0002V0-VJ for qemu-devel@nongnu.org; Wed, 26 Aug 2020 17:14:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598476431; bh=i8X1Kfb349zYfYM6YQnilalygM6Nx1dtlvg6TYGBTk8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Lr0Iw6Qf4YqNHkfBHl4RQhR48iTcCGR9KY4Fp6dBoWpDq9dweAUYtubYXx5RfrZR1 tQwi6p1maDsDrU3HFVfrlKSnLMVEFXx6HVMc3t7KTh5b8IHdIzJ6IcK8FJis9snUEQ aA7nO44GTVwCCRjgF+xqEEvUG4FOq6ONAypTkbdg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.186.77]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M2wKq-1kC9jP2oDk-003Lhn; Wed, 26 Aug 2020 23:13:51 +0200 From: Helge Deller To: peter.maydell@linaro.org, qemu-devel@nongnu.org Subject: [PULL v5 11/12] hw/display/artist: Fix invalidation of lines in artist_draw_line() Date: Wed, 26 Aug 2020 23:13:44 +0200 Message-Id: <20200826211345.14295-12-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200826211345.14295-1-deller@gmx.de> References: <20200826211345.14295-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:7EnfV1gXuxolmwFD4lmWf9YewBUCiA2wbpxCrDfm/kKmF247RH6 y6HUSKcdU6oY5aBha2d8ucAhXOoH+ZG1tUNHgk1YuQLUeSsq5k2yOuqq1jWMZPsBVAFUA6H YCIrmj7Qo1ScHHeNKv8XqO+y2ELEE9DnohcmHePx/Ay+trY+BzYh2e/KualWqhlAkZ96P38 ljORvgFFwL7HgNtJk+B/g== X-UI-Out-Filterresults: notjunk:1;V03:K0:rpRH7AQrrdE=:/QASs5NmEOHSyzQLYtAaI8 I+7jOHgx7xk3Wi8kZMT5st4V1VHgwmLHcXcC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XYRswyMLDIQ8g2nSGEfjsuP86rfvBYaX8w7yD6cNSplbu6YxQdp4oZOp2N3 5ES/Gi7xIdsDetZ4maNay+oPrzKgwW5kCyATCCvGdArNjsxUSSPaAt28GANEDkIiCka6aEoR6 knN3/zDzbC2jLrwzA Received-SPF: pass client-ip=212.227.17.21; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 17:13:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , Sven Schnelle , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Sven Schnelle 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 Signed-off-by: Helge Deller --- hw/display/artist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.21.3 diff --git a/hw/display/artist.c b/hw/display/artist.c index 44bb67bbc3..a959b2c158 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)