{
e_client_redirected_set(ep->prepare_ec, 0);
ep->ec = ep->prepare_ec;
+ // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
+ e_comp_hwc_mode_nocomp(ep->ec);
}
}
continue;
if (e_plane_is_cursor(ep)) continue;
if (ep->zpos > ep_prime->zpos)
{
- ep_prime = ep;
if (ep->prepare_ec)
{
e_client_redirected_set(ep->prepare_ec, 0);
if (ep->ec) e_client_redirected_set(ep->ec, 1);
ep->prepare_ec = NULL;
ep->ec = NULL;
+ // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
+ e_comp_hwc_mode_nocomp(NULL);
}
return EINA_TRUE;
return EINA_FALSE;
}
-void
+E_API void
_e_comp_hwc_end(const char *location)
{
Eina_Bool mode_set = EINA_FALSE;
return ECORE_CALLBACK_PASS_ON;
}
+
+static Eina_Bool
+_e_comp_cb_idle(void)
+{
+ Eina_List *l, *ll;
+ E_Zone *zone;
+ E_Client *ec;
+
+ if (!e_comp->hwc) goto end;
+ if (!_e_comp_hwc_is_on()) goto end;
+ //if (evas_changed_get(ecore_evas_get(e_comp->ee))) return ECORE_CALLBACK_RENEW;
+
+ EINA_LIST_FOREACH_SAFE(e_comp->zones, l, ll, zone)
+ {
+ E_Output *eout = NULL;
+ E_Plane *ep = NULL, *ep_prime = NULL;
+ const Eina_List *ep_l = NULL, *p_l, *p_ll;
+
+ if (!zone || !zone->output_id) continue;
+
+ eout = e_output_find(zone->output_id);
+ ep_l = e_output_planes_get(eout);
+ EINA_LIST_FOREACH_SAFE(ep_l, p_l, p_ll, ep)
+ {
+ E_Comp_Wl_Buffer *buffer;
+ if (!ep_prime)
+ {
+ if (e_plane_is_primary(ep))
+ {
+ // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
+ ec = ep->ec;
+ if (!ec)
+ {
+ if (!e_comp_object_hwc_update_exists(ec->frame)) goto end;
+ e_comp_object_hwc_update_set(ec->frame, 0);
+ buffer = e_pixmap_resource_get(ec->pixmap);
+ if (buffer) e_comp_hwc_display_client(ec);
+ }
+ goto end;
+ }
+ continue;
+ }
+ }
+ }
+
+end:
+ return ECORE_CALLBACK_RENEW;
+}
+
//////////////////////////////////////////////////////////////////////////
EINTERN Eina_Bool
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_SIGNAL_USER, _e_comp_signal_user, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMP_OBJECT_ADD, _e_comp_object_add, NULL);
+#ifdef ENABLE_HWC_MULTI
+ ecore_idle_enterer_add(_e_comp_cb_idle, NULL);
+#endif
+
return EINA_TRUE;
}
Eina_Bool native : 1; // native
Eina_Bool nocomp : 1; // nocomp applied
- Eina_Bool nocomp_need_update : 1; // nocomp in effect, but this window updated while in nocomp mode
+ Eina_Bool hwc_need_update : 1; // this window updated while on e_plane to use hwc
Eina_Bool real_hid : 1; // last hide was a real window unmap
Eina_Bool effect_set : 1; //effect_obj has a valid group
evas_object_smart_callback_call(obj, "damage", &rect);
if (e_comp->nocomp)
{
- cw->nocomp_need_update = EINA_TRUE;
+ cw->hwc_need_update = EINA_TRUE;
return;
}
+
+ // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
+ if (e_comp_is_on_overlay(cw->ec))
+ {
+ e_comp_object_hwc_update_set(obj, 1);
+ //return;
+ }
+
/* ignore overdraw */
if (cw->updates_full)
{
return cw->updates_exist;
}
+E_API Eina_Bool
+e_comp_object_hwc_update_exists(Evas_Object *obj)
+{
+ API_ENTRY EINA_FALSE;
+ return cw->hwc_need_update;
+}
+
+E_API void
+e_comp_object_hwc_update_set(Evas_Object *obj, Eina_Bool set)
+{
+ API_ENTRY EINA_FALSE;
+ cw->hwc_need_update = set;
+}
+
E_API void
e_comp_object_render_update_add(Evas_Object *obj)
{