wlroots/render
Simon Ser abf527b075 render/gles2: fix texture cleanup on destroy
When importing a DMA-BUF wlr_buffer as a wlr_texture, the GLES2
renderer caches the result, in case the buffer is used for texturing
again in the future. When the wlr_texture is destroyed by the caller,
the wlr_buffer is unref'ed, but the wlr_gles2_texture is kept around.
This is fine because wlr_gles2_texture listens for wlr_buffer's destroy
event to avoid any use-after-free.

However, with this logic wlr_texture_destroy doesn't "really" destroy
the wlr_gles2_texture. It just decrements the wlr_buffer ref'count.
Each wlr_texture_destroy call must have a matching prior
wlr_texture_create_from_buffer call or the ref'counting will go south.

Wehn destroying the renderer, we don't want to decrement any wlr_buffer
ref'count. Instead, we want to go through any cached wlr_gles2_texture
and destroy our GL state. So instead of calling wlr_texture_destroy, we
need to call our internal gles2_texture_destroy function.

Closes: https://github.com/swaywm/wlroots/issues/2941
2021-05-30 10:11:09 -04:00
..
gles2 render/gles2: fix texture cleanup on destroy 2021-05-30 10:11:09 -04:00
pixman render/pixman: avoid sqrt() in render_quad without rotation 2021-05-19 09:57:37 -04:00
allocator.c render: add DRM dumb buffer allocator 2021-05-05 10:40:21 +02:00
dmabuf.c render/dmabuf: make src arg const in wlr_dmabuf_attributes_copy 2021-02-02 19:53:16 +01:00
drm_dumb_allocator.c render: add DRM dumb buffer allocator 2021-05-05 10:40:21 +02:00
drm_format_set.c render/drm_format_set: add special case for LINEAR-only formats 2020-12-30 11:17:43 +01:00
egl.c render/egl: query and display EGL driver name 2021-05-11 12:43:25 +02:00
gbm_allocator.c render/gbm_allocator: add support for gbm_bo_get_fd_for_plane 2021-05-19 10:17:28 +02:00
meson.build render/gbm_allocator: add support for gbm_bo_get_fd_for_plane 2021-05-19 10:17:28 +02:00
pixel_format.c render/pixel_format: add XBGR8888 and ABGR8888 format 2021-03-25 10:55:54 +01:00
shm_allocator.c render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocator 2021-04-28 20:55:57 +02:00
swapchain.c render/swapchain: add support for buffer age 2020-11-15 22:48:42 +01:00
wlr_renderer.c render: remove wlr_ prefix from wlr_renderer_autocreate_with_drm_fd 2021-04-29 09:46:34 +02:00
wlr_texture.c render: relax stride check in wlr_texture_from_pixels 2021-05-19 11:13:42 -04:00