[Mesa-dev] [PATCH 3/4] vulkan/wsi/wayland: Copy wl_proxy objects from oldSwapchain if available

Daniel Stone daniel at fooishbar.org
Wed Sep 27 08:53:23 UTC 2017


Hi,

On 26 September 2017 at 23:55, Jason Ekstrand <jason at jlekstrand.net> wrote:
>  static void
> -wsi_wl_display_destroy(struct wsi_wl_display *display)
> +wsi_wl_display_ref(struct wsi_wl_display *display)
> +{
> +   display->refcount++;
> +}

Better:
static struct wsi_wl_display *
wsi_wl_display_ref(struct wsi_wl_display *display)
{
   display->refcount++;
   return display;
}

Makes it much more difficult to get it wrong. :)

Cheers,
Daniel


More information about the mesa-dev mailing list