devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=fb9e9934cf28c62cccf536d6a671dba0607e54ec

commit fb9e9934cf28c62cccf536d6a671dba0607e54ec
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Oct 16 11:22:58 2014 -0400

    Add code to handle setting surface damages
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/bin/e_comp_wl.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index aa75c51..b362058 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -228,7 +228,46 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client, 
struct wl_resource *resou
 static void 
 _e_comp_wl_surface_cb_damage(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h)
 {
+   E_Pixmap *ep;
+   uint64_t pixid;
+   E_Client *ec;
+   Eina_Rectangle *dmg = NULL;
+   int pw, ph;
+
    DBG("Surface Cb Damage: %d", wl_resource_get_id(resource));
+   DBG("\tGeom: %d %d %d %d", x, y, w, h);
+
+   /* get the e_pixmap reference */
+   if (!(ep = wl_resource_get_user_data(resource))) return;
+
+   pixid = e_pixmap_window_get(ep);
+   DBG("\tSurface has Pixmap: %llu", pixid);
+
+   /* try to find the associated e_client */
+   if (!(ec = e_pixmap_client_get(ep)))
+     {
+        if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, pixid)))
+          {
+             ERR("\tCould not find client from pixmap %llu", pixid);
+             return;
+          }
+     }
+
+   if (!ec->comp_data) return;
+
+   e_pixmap_size_get(ep, &pw, &ph);
+   DBG("\tPixmap Size: %d %d", pw, ph);
+
+   DBG("\tPending Size: %d %d", ec->comp_data->pending.w, 
+       ec->comp_data->pending.h);
+
+   DBG("\tE Client Size: %d %d", ec->client.w, ec->client.h);
+   DBG("\tE Size: %d %d", ec->w, ec->h);
+
+   dmg = eina_rectangle_new(x, y, w, h);
+
+   ec->comp_data->pending.damages = 
+     eina_list_append(ec->comp_data->pending.damages, dmg);
 }
 
 static void 

-- 


Reply via email to