From 57f0150b73cfac4f0e2f1d98663377dd26c89d09 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 29 Apr 2016 11:20:38 -0500 Subject: [PATCH] Break native surface test criteria into explicit wayland and X cases Until now it's been reasonable to consider these together as the criteria have been similar. With the upcoming introduction of wayland DMAbuf buffers, they diverge. We don't need to test for GL in the wayland case because we don't advertise GL capabilities to clients when we don't support it, so they can't create GL buffers unless we can display them. --- src/bin/e_comp_object.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 77f900482..033a46cd3 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3675,10 +3675,20 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set) if (set) { - /* native requires gl enabled, texture from pixmap enabled, and a non-shaped client */ - set = (e_comp->gl && - ((e_comp->comp_type != E_PIXMAP_TYPE_X) || e_comp_config_get()->texture_from_pixmap) && - (!cw->ec->shaped)); + switch (e_comp->comp_type) + { + case E_PIXMAP_TYPE_X: + /* native requires gl enabled, texture from pixmap enabled, and a non-shaped client */ + set = e_comp->gl && + e_comp_config_get()->texture_from_pixmap && + !cw->ec->shaped; + break; + case E_PIXMAP_TYPE_WL: + set = !e_pixmap_is_pixels(cw->ec->pixmap); + break; + default: + set = 0; + } if (set) set = (!!cw->ns) || e_pixmap_native_surface_init(cw->ec->pixmap, &ns); }