return e_surface_ec_get(e_surface_from_resource(surface_resource));
}
-EINTERN void
-e_client_fps_update(E_Client *ec)
-{
- double dt;
- double tim;
-
- EINA_SAFETY_ON_NULL_RETURN(ec);
-
- if (!ec->fps.enabled) return;
-
- tim = ecore_time_get();
-
- dt = tim - ec->fps.frametime;
-
- ec->fps.frametime = tim;
- ec->fps.time += dt;
- ec->fps.cframes++;
-
- if (ec->fps.lapse == 0.0)
- {
- ec->fps.lapse = tim;
- ec->fps.flapse = ec->fps.cframes;
- }
- else if ((tim - ec->fps.lapse) >= 0.5)
- {
- ec->fps.fps = (ec->fps.cframes - ec->fps.flapse) /
- (tim - ec->fps.lapse);
- ec->fps.lapse = tim;
- ec->fps.flapse = ec->fps.cframes;
- ec->fps.time = 0.0;
- }
-}
-
-EINTERN Eina_Bool
-e_client_fps_get(E_Client *ec, double *fps)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-
- if (ec->fps.old_fps == ec->fps.fps)
- return EINA_FALSE;
-
- if (ec->fps.fps > 0.0)
- {
- *fps = ec->fps.fps;
- ec->fps.old_fps = ec->fps.fps;
- return EINA_TRUE;
- }
-
- return EINA_FALSE;
-}
-
-EINTERN void
-e_client_fps_enable(E_Client *ec, Eina_Bool enable)
-{
- EINA_SAFETY_ON_NULL_RETURN(ec);
-
- ec->fps.enabled = enable;
-}
-
EINTERN Eina_Bool
e_client_explicit_sync_get(E_Client *ec)
{
EINTERN void e_client_layout_apply(E_Client *ec, Eina_Bool apply);
-EINTERN Eina_Bool e_client_fps_get(E_Client *ec, double *fps);
-EINTERN void e_client_fps_update(E_Client *ec);
-EINTERN void e_client_fps_enable(E_Client *ec, Eina_Bool enable);
-
EINTERN Eina_Bool e_client_explicit_sync_get(E_Client *ec);
EINTERN Eina_Bool e_client_explicit_sync_set(E_Client *ec, Eina_Bool enable);
EINTERN int e_client_explicit_sync_acquire_fence_fd_get(E_Client *ec);
E_Surface_View *view = wl_container_of(listener, view, surface_commit);
E_Surface_Event_Commit *event = data;
- if (event->committed & E_SURFACE_STATE_BUFFER)
- e_client_fps_update(view->ec);
-
if (event->committed & E_SURFACE_STATE_OPAQUE_REGION)
_surface_view_opaque_region_update(view);