E_Client_Video_Info info;
} pending;
- Eina_Bool waiting_vblank;
+ struct
+ {
+ Eina_Bool commit;
+ Eina_Bool vblank;
+ } wait_flag;
};
typedef struct _Tdm_Prop_Value
E_FREE_FUNC(evhp->video_plane_ready_handler, e_plane_hook_del);
- if (evhp->waiting_vblank) return;
+ if (evhp->wait_flag.vblank) return;
_e_video_hwc_planes_pending_buffer_commit(evhp);
}
evhp = user_data;
if (!evhp) return;
+ if (!evhp->wait_flag.commit)
+ NEVER_GET_HERE();
+
+ evhp->wait_flag.commit = EINA_FALSE;
+
e_video_hwc_current_fb_update((E_Video_Hwc *)evhp);
}
void *user_data)
{
E_Video_Hwc_Planes *evhp;
+ tdm_error err;
evhp = user_data;
if (!evhp) return;
- evhp->waiting_vblank = EINA_FALSE;
+ evhp->wait_flag.vblank = EINA_FALSE;
if (evhp->video_plane_ready_handler) return;
- _e_video_hwc_planes_pending_buffer_commit(evhp);
+ if (evhp->wait_flag.commit)
+ {
+ /* wait next vblank in case commit handler is not called yet. Because
+ * that means committed buffer is not on display yet. */
+ err = tdm_output_wait_vblank(evhp->tdm.output, 1, 0,
+ _e_video_hwc_planes_cb_vblank_handler,
+ evhp);
+ if (err != TDM_ERROR_NONE)
+ {
+ VER("failed to set handler for wait vblank", evhp->base.ec);
+ return;
+ }
+
+ evhp->wait_flag.vblank = EINA_TRUE;
+ }
+ else
+ _e_video_hwc_planes_pending_buffer_commit(evhp);
}
static Eina_Bool
ret = tdm_output_wait_vblank(evhp->tdm.output, 1, 0, _e_video_hwc_planes_cb_vblank_handler, evhp);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ret == TDM_ERROR_NONE, EINA_FALSE);
- evhp->waiting_vblank = EINA_TRUE;
+ evhp->wait_flag.commit = EINA_TRUE;
+ evhp->wait_flag.vblank = EINA_TRUE;
_tdm_layer_property_list_set(evhp->tdm.layer, &evhp->tdm.late_prop_list);