From 8b5b9989af6216dc02fa3926dbfb072205c20f1c Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 20 Feb 2018 14:17:32 -0600 Subject: [PATCH] ecore_wl2_dmabuf: Properly reconfigure on surface alpha change When alpha changes we need to blow away all our buffers in reconfigure, even if they're still the right dimensions. Otherwise we can end up rendering to an XRGB buffer when we wanted to use ARGB and we won't have proper transparency. --- src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c b/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c index 34a1edde48..f8630367f2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c +++ b/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c @@ -52,16 +52,18 @@ _evas_dmabuf_surface_reconfigure(Ecore_Wl2_Surface *s EINA_UNUSED, void *priv_da Ecore_Wl2_Dmabuf_Private *p; Ecore_Wl2_Buffer *b; Eina_List *l, *tmp; +// Eina_Bool alpha_change; p = priv_data; if ((!w) || (!h)) return; +// alpha_change = ecore_wl2_surface_alpha_get(s) != alpha; EINA_LIST_FOREACH_SAFE(p->buffers, l, tmp, b) { /* This would be nice, but requires a partial create to follow, and that partial create is buffer type specific. - if (ecore_wl2_buffer_fit(b, w, h)) + if (!alpha_change && ecore_wl2_buffer_fit(b, w, h)) continue; */ ecore_wl2_buffer_destroy(b);