From nobody Wed Nov 5 02:39:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532646021845759.9961522858383; Thu, 26 Jul 2018 16:00:21 -0700 (PDT) Received: from localhost ([::1]:38349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fipEx-0008TL-6p for importer@patchew.org; Thu, 26 Jul 2018 19:00:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fipDz-0007kh-6j for qemu-devel@nongnu.org; Thu, 26 Jul 2018 18:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fipDy-00083H-7O for qemu-devel@nongnu.org; Thu, 26 Jul 2018 18:59:11 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:36816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fipDx-00080n-W0 for qemu-devel@nongnu.org; Thu, 26 Jul 2018 18:59:10 -0400 Received: by mail-pf1-x443.google.com with SMTP id d14-v6so1054692pfo.3 for ; Thu, 26 Jul 2018 15:59:09 -0700 (PDT) Received: from paxos.mtv.corp.google.com ([2620:0:1000:1511:173b:3dd2:5b8:5730]) by smtp.gmail.com with ESMTPSA id k12-v6sm3961170pfj.30.2018.07.26.15.59.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jul 2018 15:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MATPVr6emfSbiwk0lAoLwTSlfAgFIm4LLq2QGVV/sxo=; b=p17ndBbwzPdiWLnle+YPZIs5dJaVXYykhlYEi/PnTEKqSjndWs9mgjcJrk2JCwqxpf UGX8QZK0NLu4p9qpAH14XbelkDfwWTnhPeJrcGrOUgi4IIgtRZoGPkeGy/vbfJjxU0M9 En+8k392F0zazcI120IfvK2Ly2pUSq5uvKGG/UmR41U228MsyJZ48xMREwSXZC5IH7eu 39Bx00l+DJ3rHMjdPMuhpRPizbXdOLdt9uVMmaUQNyC/m6cITKI7d9GDcWjczrqwRsS5 IfidVsePFEKKj4JqquLdxzfD5GwGTfVrJpfYsyYi6Ih5etx3x86g1uyq6Ar35p/nGwep sbOw== 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:mime-version :content-transfer-encoding; bh=MATPVr6emfSbiwk0lAoLwTSlfAgFIm4LLq2QGVV/sxo=; b=KiMEroTDuay7c8LGBV8IW9KxS4YcLvYJml1qh82wst6ekqanOqIVXbwPJhxpPYegXf pc+l38qAieWMGocHZBpQYxURQBe8eb4J6LTBH0EQ6nY2meXMMkM81TOunr4GuEkCx/eN EIFqNY7e7WRnF0+V2pww5pBGw7Ff4Mg/CTZlh1ov9/nua2J0/fAZ8TkUmOU+it95B5f/ rTM/67KfxCg48Rn09Vq8yXX4hTdR88UMUwymPqXg+dM9ZAibAv8d9ikhJ2kRaA4CGN0I 0q/ixhmilZ4zVo4RnU8QS1JzR0Y1RY3pn47sqGOh1S08h8tkwViBQIlcoG60WBjlJUsf c8hQ== X-Gm-Message-State: AOUpUlFGg5A+W+ij4POCJCkXOXBqGtetRttYOkbTvtwNxZQesP3HLYiD Rk/IZtqqcCH+hlGN+LPI3hJCUA== X-Google-Smtp-Source: AAOMgpfyr+PYqoIqbLBR2fDNVaoFxlvNzX0HGFUwWDmnw6gKSX3awVzPDG6X1sboLvCe2/xszJ2reQ== X-Received: by 2002:a63:7e1a:: with SMTP id z26-v6mr3663094pgc.278.1532645947753; Thu, 26 Jul 2018 15:59:07 -0700 (PDT) To: qemu-devel@nongnu.org, kraxel@redhat.com Date: Thu, 26 Jul 2018 15:59:00 -0700 Message-Id: <20180726225900.180698-1-lepton@google.com> X-Mailer: git-send-email 2.18.0.345.g5c9ce644c3-goog MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH] sdl2: redraw correctly when scanout_mode enabled. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tao Wu via Qemu-devel Reply-To: Tao Wu Cc: Tao Wu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When scanout_mode enabled, surface is out of sync with actual screen. In such case, we just call sdl2_gl_scanout_flush to do redraw. This fixes bug reported in https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001330= .html Signed-off-by: Tao Wu --- ui/sdl2-gl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index 83b71853d1..1bf4542d8d 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -124,6 +124,11 @@ void sdl2_gl_redraw(struct sdl2_console *scon) { assert(scon->opengl); =20 + if (scon->scanout_mode) { + /* sdl2_gl_scanout_flush actually only care about + * the first argument. */ + return sdl2_gl_scanout_flush(&scon->dcl, 0, 0, 0, 0); + } if (scon->surface) { sdl2_gl_render_surface(scon); } --=20 2.18.0.345.g5c9ce644c3-goog