forked from enlightenment/enlightenment
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.
This commit is contained in:
parent
1774b59923
commit
57f0150b73
|
@ -3675,10 +3675,20 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set)
|
|||
|
||||
if (set)
|
||||
{
|
||||
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->comp_type != E_PIXMAP_TYPE_X) || e_comp_config_get()->texture_from_pixmap) &&
|
||||
(!cw->ec->shaped));
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue