Evas_Object *underlay = NULL;
E_Comp_Screen *e_comp_screen;
Eina_List *l;
- tdm_layer *layer;
Under_Layer *ulayer;
e_comp_screen = e_comp->e_comp_screen;
{
if ((!_eff->under_layers) && (!_eff->under_checked))
{
- int i, count;
- int primary_index, primary_zpos;
- tdm_layer *primary_layer;
- tdm_output *output;
tdm_layer_capability capabilities;
+ E_Output *eoutput;
+ E_Plane *plane;
+ const Eina_List *planes, *l;
- output = tdm_display_get_output(e_comp_screen->tdisplay, 0, NULL);
- if (!output) return NULL;
+ if (!ec->zone) return NULL;
- tdm_output_get_primary_index(output, &primary_index);
- primary_layer = tdm_output_get_layer(output, primary_index, NULL);
- if (!primary_layer) return NULL;
+ eoutput = e_output_find(ec->zone->output_id);
+ if (eoutput) return NULL;
- tdm_layer_get_zpos(primary_layer, &primary_zpos);
- tdm_output_get_layer_count(output, &count);
+ planes = e_output_planes_get(eoutput);
+ if (!planes) return NULL;
- for (i = 0; i < count; i++)
+ /* Find a plane which is placed under primary and used for video.
+ * planes is supposed to be sorted by zpos (lower -> higher) */
+ EINA_LIST_FOREACH(planes, l, plane)
{
- int zpos;
+ if (e_plane_is_primary(plane))
+ break;
- if (i == primary_index) continue;
+ if (!plane->is_video)
+ continue;
- layer = tdm_output_get_layer(output, i, NULL);
- if (!layer) continue;
-
- tdm_layer_get_capabilities(layer, &capabilities);
+ tdm_layer_get_capabilities(plane->tlayer, &capabilities);
if (!(capabilities & TDM_LAYER_CAPABILITY_GRAPHIC)) continue;
- tdm_layer_get_zpos(layer, &zpos);
- if (zpos >= primary_zpos) continue;
-
ulayer = E_NEW(Under_Layer, 1);
if (!ulayer) continue;
- ulayer->zpos = zpos;
- ulayer->tlayer = layer;
+ ulayer->zpos = plane->zpos;
+ ulayer->tlayer = plane->tlayer;
_eff->under_layers = eina_list_append(_eff->under_layers,
ulayer);