Add fuctions for compositor damage calculate and flush.
authorChris Michael <cp.michael@samsung.com>
Tue, 7 May 2013 12:30:33 +0000 (13:30 +0100)
committerChris Michael <cp.michael@samsung.com>
Tue, 7 May 2013 12:30:33 +0000 (13:30 +0100)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/bin/e_wayland/e_comp.c
src/bin/e_wayland/e_comp.h

index 62521d00f4398059b0588b902b1100c63e51b1fb..3684be7677ef50d56ba2a52327b55f0b56b209ba 100644 (file)
@@ -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)
index 022ca6b73b2d7ecc60a61590f03910692c9eb889..0115976f6aae5bc6972985ce78d42dfb8597fd50 100644 (file)
@@ -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