From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za19l-0004ZX-VJ for qemu-devel@nongnu.org; Thu, 10 Sep 2015 08:40:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Za19k-00045n-Sm for qemu-devel@nongnu.org; Thu, 10 Sep 2015 08:40:49 -0400 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:35779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za19k-00045f-L8 for qemu-devel@nongnu.org; Thu, 10 Sep 2015 08:40:48 -0400 Received: by obuk4 with SMTP id k4so33337763obu.2 for ; Thu, 10 Sep 2015 05:40:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1441797654-15350-3-git-send-email-kraxel@redhat.com> References: <1441797654-15350-1-git-send-email-kraxel@redhat.com> <1441797654-15350-3-git-send-email-kraxel@redhat.com> Date: Thu, 10 Sep 2015 14:40:47 +0200 Message-ID: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/9] sdl2: quick & dirty flicker workaround List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: QEMU On Wed, Sep 9, 2015 at 1:20 PM, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > ui/sdl2-2d.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > Reviewed-by: Marc-Andr=C3=A9 Lureau > diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c > index d0b340f..191ee3b 100644 > --- a/ui/sdl2-2d.c > +++ b/ui/sdl2-2d.c > @@ -45,10 +45,23 @@ void sdl2_2d_update(DisplayChangeListener *dcl, > return; > } > > + /* > + * SDL2 seems to do some double-buffering, and trying to only > + * update the changed areas results in only one of the two buffers > + * being updated. Which flickers alot. So lets not try to be > + * clever do a full update every time ... > + */ > +#if 0 > rect.x =3D x; > rect.y =3D y; > rect.w =3D w; > rect.h =3D h; > +#else > + rect.x =3D 0; > + rect.y =3D 0; > + rect.w =3D surface_width(surf); > + rect.h =3D surface_height(surf); > +#endif > > SDL_UpdateTexture(scon->texture, NULL, surface_data(surf), > surface_stride(surf)); > -- > 1.8.3.1 > > --=20 Marc-Andr=C3=A9 Lureau