return EINA_TRUE;
}
+static void
+_e_video_hwc_render_job(void *data)
+{
+ E_Video_Hwc *evh;
+ E_Client *topmost;
+ Eina_Bool render = EINA_FALSE;
+
+ evh = data;
+ if (evh->render.map)
+ {
+ evh->render.map = EINA_FALSE;
+ render = _e_video_hwc_geometry_map_apply(evh->ec, &evh->geo);
+ }
+
+ if (evh->render.topmost_viewport)
+ {
+ evh->render.topmost_viewport = EINA_FALSE;
+ topmost = e_comp_wl_topmost_parent_get(evh->ec);
+ if (topmost)
+ e_comp_wl_viewport_apply(topmost);
+ render = EINA_TRUE;
+ }
+
+ if ((render) || (evh->render.buffer_change))
+ {
+ evh->render.buffer_change = EINA_FALSE;
+ _e_video_hwc_render(evh, __FUNCTION__);
+ }
+
+ evh->render.job = NULL;
+}
+
+static void
+_e_video_hwc_render_queue(E_Video_Hwc *evh)
+{
+ if (evh->render.job)
+ ecore_job_del(evh->render.job);
+
+ evh->render.job = ecore_job_add(_e_video_hwc_render_job, evh);
+}
+
static void
_e_video_hwc_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
E_Video_Hwc *evh = data;
- if (_e_video_hwc_geometry_map_apply(evh->ec, &evh->geo))
- _e_video_hwc_render(evh, __FUNCTION__);
+ evh->render.map = EINA_TRUE;
+ _e_video_hwc_render_queue(evh);
}
static void
{
E_Video_Hwc *evh = data;
- if (_e_video_hwc_geometry_map_apply(evh->ec, &evh->geo))
- _e_video_hwc_render(evh, __FUNCTION__);
+ evh->render.map = EINA_TRUE;
+ _e_video_hwc_render_queue(evh);
}
static E_Comp_Wl_Video_Buf *
if (ec == e_comp_wl_topmost_parent_get(evh->ec))
{
VIN("video need rendering..", evh->ec);
- e_comp_wl_viewport_apply(ec);
- _e_video_hwc_render(evh, __FUNCTION__);
+ evh->render.topmost_viewport = EINA_TRUE;
+ _e_video_hwc_render_queue(evh);
}
return ECORE_CALLBACK_PASS_ON;
if (e_object_is_del(E_OBJECT(ec)))
return ECORE_CALLBACK_PASS_ON;
- _e_video_hwc_render(evh, __FUNCTION__);
+ evh->render.buffer_change = EINA_TRUE;
+ _e_video_hwc_render_queue(evh);
return ECORE_CALLBACK_PASS_ON;
}
if (e_comp_object_mask_has(evh->ec->frame))
e_comp_object_mask_set(evh->ec->frame, EINA_FALSE);
+ E_FREE_FUNC(evh->render.job, ecore_job_del);
+
evh->backend.destroy(evh);
}