From patchwork Tue Feb 18 19:39:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 183616 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp6488980ile; Tue, 18 Feb 2020 11:43:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyJRB/c2fKHlSKe0d5nipokexCOEzEl+uBy4sS8v4RDuMJM5L4HRbQSCQgwjEYb3VEjdkbD X-Received: by 2002:a0c:b61c:: with SMTP id f28mr18470606qve.101.1582055003087; Tue, 18 Feb 2020 11:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582055003; cv=none; d=google.com; s=arc-20160816; b=rXNHuKCT37+m8Ci/ZRHLTFHs01+B5iuZ9iQOoOWzGhPjzXbNV13b/d7cPJYsT6gLvY lMbgh3vBh5+1lh9pWELl7czEZiUQU7mn/+1ZZ5n73fkwDeAkE78Xlxx/fAbdVw2yPyyZ KnynK2bbt6yY7QPhU3ncUIbBvmtAnKIuDejhDFBpzWhnLay8a8YFlBiW0pLy+/qS/TV2 5Pba5EWl5VSQndW4kQh/hSp+lnaPzBbpnPDl+yKgD0Ob3V92yTOQvYkB0rv6MVef+Y4u W7YDJCfPDdYFADw4OV8OF/7bF1z2gim+3py/RKnTOpj5SzYvS9+OTyMHdkbacCyVARrK n7sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=VWkmmOSNRrmSWVThvM1btX2IQ2jQ25rI+tGcKooV13k=; b=Tcfz7zNj5HTNgmcelhHepM83/W028Z1qtCtg/J2D0L+f+1x/TEYWaBG8o6bWfiLJx6 /Nd649RitVAaj4rZjcw5a2urkNow0rN3hLJIWXJhySyIMBBvthh9oPQcJ70VhxpYsA1D e7lBgZve4qEa0k/MsZL65U6UNCmwO204rFtdsD9roL8SndtsPIh5AOYeDbckBCWo5BOc 8HFhGow0Cpxka2gPZoj7siVcmtbU5+XSZI9NmRiqQ1B3QyjRkYtyyB6kqGFRuFGsUYuC +yHhvEwvkhw6Ek7CoJEBWLdmTEWBHiJZlPqvHNYxg967CPxja3DNa1gKFiFSOoiprV9r KkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RUYFJ2yB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k8si2219050qvp.76.2020.02.18.11.43.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Feb 2020 11:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RUYFJ2yB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48m9-0001Ue-Ky for patch@linaro.org; Tue, 18 Feb 2020 14:43:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55060) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48iZ-0003co-F7 for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iY-0004Lg-GJ for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:39 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:42812) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iY-0004K7-Ag for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:38 -0500 Received: by mail-pg1-x529.google.com with SMTP id w21so11428992pgl.9 for ; Tue, 18 Feb 2020 11:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VWkmmOSNRrmSWVThvM1btX2IQ2jQ25rI+tGcKooV13k=; b=RUYFJ2yBNNB/FI7ZcZaMOn8rTEZ+F93tRFKn0W8+h0ccY49o6pkEK5NCCN1NFgRg2C wzIwa1CUwDgPi2j8yKasWW10C+TW+ojUGT+eyzNSMWkvDp+XFkOiBPXPJZRSgOCQJkzb mUFNWsne7c5mmXgxhHQavOr1d9kT+dJyGI/EtyPpYAkkafCxSUXd3ocxlt+QFxYck3Hy wwWxwdmX2oICJ7QFUA3hw5C8+HnBVPad+polGMGpXcn4iJRr6mJ/VSUSZ+hW0hRE6GGs rqFHsrpS52Rqp5t7Blyl43osNdAZv3u3kcZXDznH2y+A1SJ/3SDEbEF3Wyz52yJPOEf+ yM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VWkmmOSNRrmSWVThvM1btX2IQ2jQ25rI+tGcKooV13k=; b=oda91bcmlEmJz7K+YoZ9Tb9PWa60Nf4YCDgwHc+M0klxRu9WDIDUrgmyrB3GDMM3Et ikqF/l0nHpicy7QydXzdfp8LjWVKZ+oqbnL3GPVOcKqAJFMFNeCNKA4qBf5vHe1kuZFX l9TZ2KQo8XjGUINfkkxYbIVlbX3QmkdIPhSdhoHjSdG9u2lKPYAMnAcNau7XUHUTPJgs OQJkgaTNYanz911jiwdYaZH4MdO4/ppukfMH/I6dND6YgEuZHX5EBhIJ7WBoj0H5VS4o yixv7MOc287QSLCKNGMVMG/wberZCWfZvL48ZDVwDxJ7WaQP4HXusJG3r+zJEpsY4VNY mkEA== X-Gm-Message-State: APjAAAXp6hyK0i/cPyEwgDEVOEW/z/zq6e1HFphVs5hQCM3+0MgELXTW 3UT+aLxuOe55DOGapKKe/x1J5PF73mw= X-Received: by 2002:a63:445e:: with SMTP id t30mr24625651pgk.367.1582054776923; Tue, 18 Feb 2020 11:39:36 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 4/9] hw/display/artist: Avoid drawing line when nothing to display Date: Tue, 18 Feb 2020 11:39:24 -0800 Message-Id: <20200218193929.11404-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::529 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: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200214001303.12873-5-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/hw/display/artist.c b/hw/display/artist.c index 97c811b35e..5492079116 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -579,6 +579,9 @@ static void draw_line(ARTISTState *s, int x1, int y1, int x2, int y2, } else { dy = y1 - y2; } + if (!dx || !dy) { + return; + } c1 = false; if (dy > dx) {