[Spice-devel] [spice-gtk PATCH v2] spice-widget: init egl only after first gl_scanout
Lukas Venhoda
lvenhoda at redhat.com
Wed Jul 27 14:18:14 UTC 2016
Hi
On Wed, Jul 27, 2016 at 3:56 PM, Marc-André Lureau <mlureau at redhat.com>
wrote:
> Hi
>
> ----- Original Message -----
> > When using GtkDrawingArea and EGL was not used, it was still initialized.
> > This produced warning messages on systems where EGL is not supported.
>
> Not sure it's really a big problem since we require GL anyway.
>
> Which system doesn't support egl?
>
For example when running the client in virtual machine.
The point is, that we shouldn't initialize EGL, if we are not going to use
it.
> >
> > Move spice_egl_init from drawing_area_realize to gl_scanout.
> > Drawing_area_realize is no longer needed.
> > ---
> > Changes since v1:
> > - changed from recursive call to if check
> > - moved set_egl_enabled(display, true); after initialisation is finished
> > ---
>
> Have you checked the behaviour on wayland?
>
Yes, it's working correctly in wayland.
> Because spice_egl_init() is already called in gl_area_realize in this case.
>
Well spice_egl_init() sets context_ready to true, so it should never be
called twice.
> Furthermore, there is no guarantee that the widget is realized when
> spice_display_widget_gl_scanout() is called, which would results in other
> warnings/criticals messages.
>
This could potentionally be a problem. Does spice_egl_realize_display()
require the widget to be fully realized before the call?
Also wouldn't it be better, to move all of the EGL code to GtkGLArea,
instead of GtkDrawArea even for X11?
--
Lukas Venhoda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160727/2bf00c02/attachment-0001.html>
More information about the Spice-devel
mailing list