E_Plane *plane = NULL;
Eina_List *l;
Eina_Bool fb_commit = EINA_FALSE;
- Eina_Bool fb_hwc_on = EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
/* set planes */
EINA_LIST_FOREACH(output->planes, l, plane)
{
- if (e_plane_is_fb_target(plane) && plane->ec)
- fb_hwc_on = EINA_TRUE;
+ if (plane->need_unset && plane->sync_unset_count)
+ {
+ if (fb_commit)
+ {
+ plane->sync_unset_count--;
+ if (plane->sync_unset_count)
+ continue;
+ }
+ }
if (!e_plane_fetch(plane)) continue;
+ if (e_plane_is_fb_target(plane))
+ fb_commit = EINA_TRUE;
+
if (output->dpms == E_OUTPUT_DPMS_OFF)
{
if (!plane->need_unset_commit)
e_plane_unfetch(plane);
}
-
- if (e_plane_is_fb_target(plane))
- fb_commit = EINA_TRUE;
}
if (output->dpms == E_OUTPUT_DPMS_OFF) return EINA_TRUE;
EINA_LIST_FOREACH(output->planes, l, plane)
{
- if (plane->need_unset_commit && !fb_hwc_on && !fb_commit)
+ if (plane->need_unset_commit && plane->sync_unset_count)
continue;
if (e_plane_is_fb_target(plane) && fb_commit)
data->tsurface = NULL;
data->ec = NULL;
plane->need_unset_commit = EINA_FALSE;
+ plane->sync_unset_count = 0;
return data;
}
E_API Eina_Bool
e_plane_ec_set(E_Plane *plane, E_Client *ec)
{
+ E_Plane *fb_target = NULL;
+
EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
if (plane_trace_debug)
if (!plane->is_fb)
{
if (plane->tsurface)
- plane->need_unset = EINA_TRUE;
+ {
+ fb_target = e_output_fb_target_get(plane->output);
+ if (fb_target)
+ {
+ if(fb_target->ec)
+ plane->sync_unset_count = 0;
+ else
+ plane->sync_unset_count = e_plane_renderer_render_count_get(fb_target->renderer) + 1;
+ }
+
+ plane->need_unset = EINA_TRUE;
+ }
if (plane->renderer)
{
Eina_List *pending_commit_data_list;
Eina_Bool need_unset;
Eina_Bool need_unset_commit;
+ int sync_unset_count;
/* true if plane's ec is set or unset.
* false when E_Event_Plane_Win_Change has been generated.