From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv4l9-0006kz-4Q for qemu-devel@nongnu.org; Wed, 20 May 2015 10:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv4l3-0002Gs-GT for qemu-devel@nongnu.org; Wed, 20 May 2015 10:14:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv4l3-0002Gc-Bg for qemu-devel@nongnu.org; Wed, 20 May 2015 10:14:05 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 68CEE8F005 for ; Wed, 20 May 2015 14:14:04 +0000 (UTC) Message-ID: <1432131241.32168.74.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 20 May 2015 16:14:01 +0200 In-Reply-To: <555C8C21.90205@redhat.com> References: <1432045761-15543-1-git-send-email-kraxel@redhat.com> <1432045761-15543-5-git-send-email-kraxel@redhat.com> <555C8C21.90205@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/4] gtk: add opengl support, using egl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Paolo Bonzini , qemu-devel@nongnu.org Hi, > I can't give any R-b, because that would require really digging into > Gtk... The code is pretty similar to the SDL code, though (not by > chance I guess), Indeed ;) > so it looks fine to me. If it would compile, that is, see below. >=20 > (It does work with Gtk 2, though) >=20 > ((at least on my laptop with mesa; on my desktop with fglrx, creating > the shader fails, which may or may not have to do something with > "libEGL warning: DRI2: failed to authenticate" (which is probably in > turn my own fault for using a proprietary driver)))=20 Could also be selinux. > > +#if defined(CONFIG_OPENGL) > > + if (display_opengl) { > > + gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE); >=20 > gcc said: > > qemu/ui/gtk.c:1742:9: Fehler: =C2=BBgtk_widget_set_double_buffered=C2= =AB is > deprecated (declared at /usr/include/gtk-3.0/gtk/gtkwidget.h:896) > [-Werror=3Ddeprecated-declarations] Yep, that is a bit awkward. Deprecated because gtk_widget_set_double_buffered() doesn't work with the wayland backend. The switch simply doesn't make sense with the wayland rendering pipeline, and the egl rendering might not work on wayland because of that (/me didn't try). Nevertheless gtk_widget_set_double_buffered() is required to make gl rendering work (on X11 backend), for versions older than 3.16. On 3.16+ we can use the opengl support provided by gtk instead. Code for that still needs to be written though. > But then again it didn't compile before, either: qemu/ui/gtk.c:1927:5: > Fehler: =C2=BBgdk_cursor_new=C2=AB is deprecated (declared > at /usr/include/gtk-3.0/gdk/gdkcursor.h:223) > [-Werror=3Ddeprecated-declarations] Saw your patch for that, thanks. > gtk_widget_set_double_buffered() was deprecated in 3.14 already (as > far as I can see from the header file alone). They should have done that in 3.16 IMO ... cheers, Gerd