devilhorns pushed a commit to branch master.

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

commit 5b2d5a58f63a4e226c3ecb5f1aac86d779150938
Author: Chris Michael <[email protected]>
Date:   Thu Oct 16 11:23:41 2014 -0400

    add code to handle setting surface opaque region
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/e_comp_wl.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index b362058..4117a83 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -279,7 +279,43 @@ _e_comp_wl_surface_cb_frame(struct wl_client *client, 
struct wl_resource *resour
 static void 
 _e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, 
struct wl_resource *resource, struct wl_resource *region_resource)
 {
+   E_Pixmap *ep;
+   uint64_t pixid;
+   E_Client *ec;
+
    DBG("Surface Opaque Region Set: %d", wl_resource_get_id(resource));
+
+   /* get the e_pixmap reference */
+   if (!(ep = wl_resource_get_user_data(resource))) return;
+
+   /* 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;
+          }
+     }
+
+   /* trap for clients which are being deleted */
+   if (e_object_is_del(E_OBJECT(ec))) return;
+
+   if (region_resource)
+     {
+        Eina_Tiler *tmp;
+
+        if (!(tmp = wl_resource_get_user_data(region_resource)))
+          return;
+
+        eina_tiler_union(ec->comp_data->pending.opaque, tmp);
+     }
+   else
+     {
+        eina_tiler_clear(ec->comp_data->pending.opaque);
+        eina_tiler_rect_add(ec->comp_data->pending.opaque, 
+                            &(Eina_Rectangle){0, 0, ec->client.w, 
ec->client.h});
+     }
 }
 
 static void 

-- 


Reply via email to