[PATCH 1/3] glamor: Always destroy EGL image associated with destroyed pixmap

Zhigang Gong zhigang.gong at linux.intel.com
Tue Dec 9 01:16:59 PST 2014


Hi Keith,

I still remember the back_pixmap issue which make the APIs
and the code path of screen closing very weird. Now things
become much clearer as the back_pixmap is not a special
pixmap now. Thanks!

One minor comment as embedded below

>  
> -void
> -glamor_destroy_textured_pixmap(PixmapPtr pixmap)
> +Bool
> +glamor_destroy_pixmap(PixmapPtr pixmap)
>  {
>      if (pixmap->refcnt == 1) {
> -        glamor_pixmap_private *pixmap_priv;
> -
> -        pixmap_priv = glamor_get_pixmap_private(pixmap);
> +        glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
>          if (pixmap_priv != NULL)
>              glamor_pixmap_destroy_fbo(pixmap_priv);
> +#if GLAMOR_HAS_GBM
> +        glamor_egl_destroy_pixmap_image(pixmap);

glamor_egl_destroy_pixmap_image assume the pixmap has a valid pixmap_priv,
so we need to make sure of that before we call into that function. Alternative
is to do that check in glamor_egl_destroy_pixmap_image.

The other part of this patch LGTM.

Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>

Thanks,
Zhigang Gong.


More information about the xorg-devel mailing list