ecore_wl2_dmabuf: Properly reconfigure on surface alpha change
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 20 Feb 2018 20:17:32 +0000 (14:17 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 30 May 2018 04:15:53 +0000 (13:15 +0900)
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

index 34a1edd..f863036 100644 (file)
@@ -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);