qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/4] gtk: add opengl support, using egl


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 4/4] gtk: add opengl support, using egl
Date: Wed, 20 May 2015 16:14:01 +0200

  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.
> 
> (It does work with Gtk 2, though)
> 
> ((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))) 

Could also be selinux.

> > +#if defined(CONFIG_OPENGL)
> > +    if (display_opengl) {
> > +        gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE);
> 
> gcc said:
> > qemu/ui/gtk.c:1742:9: Fehler: »gtk_widget_set_double_buffered« is
> deprecated (declared at /usr/include/gtk-3.0/gtk/gtkwidget.h:896)
> [-Werror=deprecated-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: »gdk_cursor_new« is deprecated (declared
> at /usr/include/gtk-3.0/gdk/gdkcursor.h:223)
> [-Werror=deprecated-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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]