return NULL;
}
+static Eina_Bool
+_e_video_hwc_cb_client_show(void *data, int type, void *event)
+{
+ E_Event_Client *ev = event;
+ E_Client *ec;
+ E_Client *video_ec = NULL;
+ E_Video_Hwc *evh = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
+
+ ec = ev->ec;
+ if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
+
+ video_ec = e_video_hwc_child_client_get(ec);
+ if (!video_ec) return ECORE_CALLBACK_PASS_ON;
+
+ evh = data;
+ if (!evh) return ECORE_CALLBACK_PASS_ON;
+
+ VIN("show: find video child(0x%08"PRIxPTR")", evh->ec,
+ (Ecore_Window)e_client_util_win_get(video_ec));
+ if (evh->old_comp_buffer)
+ {
+ VIN("video already rendering..", evh->ec);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ 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__);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
static Eina_Bool
_e_video_hwc_cb_client_buffer_change(void *data, int type, void *event)
{
static void
_e_video_hwc_client_event_init(E_Video_Hwc *evh)
{
+ E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_SHOW,
+ _e_video_hwc_cb_client_show, evh);
E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_BUFFER_CHANGE,
_e_video_hwc_cb_client_buffer_change, evh);
}
return EINA_TRUE;
}
-static Eina_Bool
-_e_video_cb_ec_client_show(void *data, int type, void *event)
-{
- E_Event_Client *ev = event;
- E_Client *ec;
- E_Client *video_ec = NULL;
- E_Video_Hwc_Planes *evhp = NULL;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
- EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
-
- ec = ev->ec;
- if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
-
- video_ec = e_video_hwc_child_client_get(ec);
- if (!video_ec) return ECORE_CALLBACK_PASS_ON;
-
- evhp = data;
- if (!evhp) return ECORE_CALLBACK_PASS_ON;
-
- VIN("show: find video child(0x%08"PRIxPTR")", evhp->base.ec,
- (Ecore_Window)e_client_util_win_get(video_ec));
- if (evhp->base.old_comp_buffer)
- {
- VIN("video already rendering..", evhp->base.ec);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (ec == e_comp_wl_topmost_parent_get(evhp->base.ec))
- {
- VIN("video need rendering..", evhp->base.ec);
- e_comp_wl_viewport_apply(ec);
- e_video_hwc_render((E_Video_Hwc *)evhp, __FUNCTION__);
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
static Eina_Bool
_e_video_cb_ec_visibility_change(void *data, int type, void *event)
{
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE,
_e_video_cb_evas_hide, evhp);
- E_LIST_HANDLER_APPEND(evhp->base.ec_event_handler, E_EVENT_CLIENT_SHOW,
- _e_video_cb_ec_client_show, evhp);
E_LIST_HANDLER_APPEND(evhp->base.ec_event_handler, E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE,
_e_video_cb_ec_visibility_change, evhp);
E_LIST_HANDLER_APPEND(evhp->base.ec_event_handler, E_EVENT_CLIENT_VISIBILITY_CHANGE,
return EINA_TRUE;
}
-static Eina_Bool
-_e_video_cb_ec_client_show(void *data, int type, void *event)
-{
- E_Event_Client *ev = event;
- E_Client *ec;
- E_Client *video_ec = NULL;
- E_Video_Hwc_Windows *evhw = NULL;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
- EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
-
- ec = ev->ec;
- if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
-
- video_ec = e_video_hwc_child_client_get(ec);
- if (!video_ec) return ECORE_CALLBACK_PASS_ON;
-
- evhw = data;
- if (!evhw) return ECORE_CALLBACK_PASS_ON;
-
- VIN("show: find video child(0x%08"PRIxPTR")",
- evhw->base.ec, (Ecore_Window)e_client_util_win_get(video_ec));
- if(evhw->base.old_comp_buffer)
- {
- VIN("video already rendering..", evhw->base.ec);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (ec == e_comp_wl_topmost_parent_get(evhw->base.ec))
- {
- VIN("video need rendering..", evhw->base.ec);
- e_comp_wl_viewport_apply(ec);
- e_video_hwc_render((E_Video_Hwc *)evhw, __FUNCTION__);
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
static Eina_Bool
_e_video_cb_ec_visibility_change(void *data, int type, void *event)
{
e_comp_wl_hook_add(E_COMP_WL_HOOK_SUBSURFACE_CREATE,
_e_video_hwc_windows_cb_hook_subsurface_create, evhw);
- E_LIST_HANDLER_APPEND(evhw->base.ec_event_handler, E_EVENT_CLIENT_SHOW,
- _e_video_cb_ec_client_show, evhw);
E_LIST_HANDLER_APPEND(evhw->base.ec_event_handler, E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE,
_e_video_cb_ec_visibility_change, evhw);
E_LIST_HANDLER_APPEND(evhw->base.ec_event_handler, E_EVENT_CLIENT_VISIBILITY_CHANGE,