Add fuctions for compositor damage calculate and flush.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
fb2e3f9c92
commit
075da5d708
|
@ -263,6 +263,46 @@ e_compositor_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void
|
|||
return 1;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_compositor_damage_calculate(E_Compositor *comp)
|
||||
{
|
||||
E_Plane *plane;
|
||||
E_Surface *es;
|
||||
Eina_List *l;
|
||||
Eina_Rectangle *clip, *opaque;
|
||||
|
||||
/* check for valid compositor */
|
||||
if (!comp) return;
|
||||
|
||||
clip = eina_rectangle_new(0, 0, 0, 0);
|
||||
|
||||
/* loop the planes */
|
||||
EINA_LIST_FOREACH(comp->planes, l, plane)
|
||||
{
|
||||
/* loop the surfaces */
|
||||
EINA_LIST_FOREACH(comp->surfaces, l, es)
|
||||
{
|
||||
if (es->plane != plane) continue;
|
||||
e_surface_damage_calculate(es);
|
||||
}
|
||||
}
|
||||
|
||||
eina_rectangle_free(clip);
|
||||
|
||||
/* loop the surfaces */
|
||||
EINA_LIST_FOREACH(comp->surfaces, l, es)
|
||||
{
|
||||
if (!es->buffer.keep)
|
||||
e_buffer_reference(&es->buffer.reference, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_compositor_damage_flush(E_Compositor *comp, E_Surface *es)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* local functions */
|
||||
static void
|
||||
_e_comp_cb_bind(struct wl_client *client, void *data, unsigned int version EINA_UNUSED, unsigned int id)
|
||||
|
|
|
@ -65,6 +65,8 @@ EAPI Eina_Bool e_compositor_shutdown(E_Compositor *comp);
|
|||
EAPI E_Compositor *e_compositor_get(void);
|
||||
EAPI void e_compositor_plane_stack(E_Compositor *comp, E_Plane *plane, E_Plane *above);
|
||||
EAPI int e_compositor_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data);
|
||||
EAPI void e_compositor_damage_calculate(E_Compositor *comp);
|
||||
EAPI void e_compositor_damage_flush(E_Compositor *comp, E_Surface *es);
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue