Re: [PATCH spice-gtk 7/7] egl: set current context, fix multiple display

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

 



On Mon, May 23, 2016 at 06:40:40AM -0400, Marc-André Lureau wrote:
> 
> 
> ----- Original Message -----
> > Hi,
> > 
> > On Fri, 2016-05-20 at 17:16 +0200, Marc-André Lureau wrote:
> > > On X11, each widget has its own context. Make sure we are using the
> > > widget associated context when using gl.
> > > 
> > > Fixes:
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1337721
> > > 
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> > > ---
> > >  src/spice-widget-egl.c | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > > 
> > > diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
> > > index 754fc20..5612959 100644
> > > --- a/src/spice-widget-egl.c
> > > +++ b/src/spice-widget-egl.c
> > > @@ -349,6 +349,14 @@ void spice_egl_unrealize_display(SpiceDisplay
> > > *display)
> > >  
> > >      SPICE_DEBUG("egl unrealize %p", d->egl.surface);
> > >  
> > > +    if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
> > > +        EGLBoolean b = eglMakeCurrent(d->egl.display,
> > > +                                      d->egl.surface,
> > > +                                      d->egl.surface,
> > > +                                      d->egl.ctx);
> > > +        g_return_if_fail(b == EGL_TRUE);
> > 
> > Can we come up with a better name ? A critical message saying 'b == EGL_TRUE'
> > is
> > not very helpful...
> 
> Well, "success" :) is not much more helpful, what is really
> interesting is line number, function, and G_DEBUG=fatal_criticals to
> break there.

You could call it make_current_status.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]