{
E_Output *output = NULL;
E_Plane *plane = NULL;
+ E_Plane *default_fb = NULL;
tdm_output *toutput = NULL;
tdm_error error;
char *id = NULL;
output->planes = eina_list_sort(output->planes, eina_list_count(output->planes), _e_output_cb_planes_sort);
+ default_fb = e_output_default_fb_target_get(output);
+ if (!default_fb)
+ {
+ ERR("fail to get default_fb_target plane");
+ goto fail;
+ }
+
+ if (!e_plane_fb_target_set(default_fb, EINA_TRUE))
+ {
+ ERR("fail to set fb_target plane");
+ goto fail;
+ }
+
output->e_comp_screen = e_comp_screen;
return output;
EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
{
- if (plane->is_primary)
+ if (plane->is_fb)
{
if (!e_plane_setup(plane)) return EINA_FALSE;
else return EINA_TRUE;
return NULL;
}
+EINTERN E_Plane *
+e_output_default_fb_target_get(E_Output *output)
+{
+ Eina_List *p_l;
+ E_Plane *ep;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output->planes, EINA_FALSE);
+
+ /* find lowest zpos graphic type layer */
+ EINA_LIST_FOREACH(output->planes, p_l, ep)
+ {
+ if (e_plane_type_get(ep) == E_PLANE_TYPE_GRAPHIC)
+ {
+ Eina_List *formats = NULL;
+ Eina_List *formats_l = NULL;
+ Eina_Bool available_rgb = EINA_FALSE;
+ tbm_format *format;
+
+ formats = e_plane_available_tbm_formats_get(ep);
+ if (!formats) continue;
+
+ EINA_LIST_FOREACH(formats, formats_l, format)
+ {
+ if (*format == TBM_FORMAT_ARGB8888 ||
+ *format == TBM_FORMAT_XRGB8888)
+ {
+ available_rgb = EINA_TRUE;
+ break;
+ }
+ }
+
+ if (!available_rgb) continue;
+
+ return ep;
+ }
+ }
+
+ return NULL;
+}
+
E_API E_Output *
e_output_find_by_index(int index)
{
EINTERN Eina_Bool e_output_connected(E_Output *output);
EINTERN Eina_Bool e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val);
EINTERN void e_output_size_get(E_Output *output, int *w, int *h);
+EINTERN E_Plane * e_output_default_fb_target_get(E_Output *output);
E_API E_Output * e_output_find(const char *id);
E_API E_Output * e_output_find_by_index(int index);
E_API const Eina_List * e_output_planes_get(E_Output *output);
/* check the layer is the primary layer */
if (layer_capabilities & TDM_LAYER_CAPABILITY_PRIMARY)
- {
- plane->is_primary = EINA_TRUE;
- plane->is_fb = EINA_TRUE; // TODO: query from libtdm if it is fb target plane
- }
+ plane->is_primary = EINA_TRUE;
if (layer_capabilities & TDM_LAYER_CAPABILITY_VIDEO)
plane->type = E_PLANE_TYPE_VIDEO;