<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 28, 2016 at 3:40 PM, Marc-André Lureau <span dir="ltr"><<a href="mailto:mlureau@redhat.com" target="_blank">mlureau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
<div><div class="h5"><br>
----- Original Message -----<br>
> When using GtkDrawingArea and EGL was not used, it was still initialized.<br>
> This produced warning messages on systems where EGL is not supported.<br>
><br>
> Move spice_egl_init from drawing_area_realize to gl_scanout.<br>...<br>
><br>
> @@ -2662,8 +2653,28 @@ G_GNUC_INTERNAL<br>
> void spice_display_widget_gl_scanout(SpiceDisplay *display)<br>
> {<br>
> SpiceDisplayPrivate *d = display->priv;<br>
> + GError *err = NULL;<br>
><br>
<br>
</div></div>To avoid unused variables, you should move it...<br>
<span class=""><br>
> SPICE_DEBUG("%s: got scanout", __FUNCTION__);<br>
> +<br>
> +#ifdef GDK_WINDOWING_X11<br>
> + GtkWidget *area = gtk_stack_get_child_by_name(d->stack, "draw-area");<br>
> +<br>
> + if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) &&<br>
> + !d->egl.context_ready &&<br>
> + gtk_widget_get_realized(area)) {<br>
<br>
</span>here<br>
<span class=""><br>
> + if (!spice_egl_init(display, &err)) {<br>
> + g_critical("egl init failed: %s", err->message);<br>
> + g_clear_error(&err);<br>
> + }<br>
> +<br>
> + if (!spice_egl_realize_display(display, gtk_widget_get_window(area),<br>
> &err)) {<br>
> + g_critical("egl realize failed: %s", err->message);<br>
> + g_clear_error(&err);<br>
> + }<br>
> + }<br>
> +#endif<br>
> +<br>
> set_egl_enabled(display, true);<br>
><br>
> if (d->egl.context_ready) {<br>
> --<br>
<br>
</span>other than that, looks good, ack<br></blockquote><div><br></div><div>aah there's a second "GError *err = NULL;", in the "if (d->egl.context_ready)" block</div><div>that was supposed to be deleted. I guess I missed it</div><div><br></div><div>I'll send a fixup as v4.</div><div><br></div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Lukas Venhoda</div>
</div></div>