cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=12fcaf77d6f328a01faa4bf3aa23fe66b4fb5b9e

commit 12fcaf77d6f328a01faa4bf3aa23fe66b4fb5b9e
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Wed Mar 22 12:56:28 2017 -0700

    evas: remove pixels hook from x11 backend now that we don't use it anymore
---
 .../software_x11/Evas_Engine_Software_X11.h        |  3 --
 .../evas/engines/software_x11/evas_engine.c        | 58 ----------------------
 .../evas/engines/software_x11/evas_engine.h        |  7 ---
 .../evas/engines/software_x11/evas_xlib_outbuf.c   |  6 ---
 4 files changed, 74 deletions(-)

diff --git a/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h 
b/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
index 0917f08..08e2543 100644
--- a/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
+++ b/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
@@ -40,11 +40,8 @@ struct _Evas_Engine_Info_Software_X11
         void *(*best_visual_get) (int backend, void *connection, int screen);
         unsigned int (*best_colormap_get) (int backend, void *connection, int 
screen);
         int (*best_depth_get) (int backend, void *connection, int screen);
-        void (*region_push_hook)(Evas *push_to, int x, int y, int w, int h, 
const void *pixels);
      } func;
 
-   Evas *push_to;
-
    unsigned char mask_changed : 1;
 
    /* non-blocking or blocking mode */
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c 
b/src/modules/evas/engines/software_x11/evas_engine.c
index 718afdb..562c5f1 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -46,18 +46,6 @@ struct _Render_Engine
    } egl;
 };
 
-typedef struct _Region_Push_Hook_Ctx {
-   X_Output_Buffer *changed_pixels;
-   Outbuf *buf;
-   Eina_Spinlock *lock;
-   struct {
-      void (*cb)(Evas *evas, int x, int y, int w, int h, const void *pixels);
-      Evas *evas;
-   } region_push_hook;
-   int x;
-   int y;
-} Region_Push_Hook_Ctx;
-
 /* prototypes we will use here */
 static void *_best_visual_get(int backend, void *connection, int screen);
 static unsigned int _best_colormap_get(int backend, void *connection, int 
screen);
@@ -70,48 +58,6 @@ static void eng_output_free(void *data);
 static Eina_List *_outbufs = NULL;
 
 /* internal engine routines */
-
-
-static void
-_evas_software_x11_region_push_hook_call(void *data)
-{
-   Region_Push_Hook_Ctx *ctx = data;
-
-   if (eina_list_data_find(_outbufs, ctx->buf))
-     {
-        ctx->region_push_hook.cb(ctx->region_push_hook.evas, ctx->x, ctx->y,
-                                 ctx->changed_pixels->xim->width,
-                                 ctx->changed_pixels->xim->height,
-                                 
evas_software_xlib_x_output_buffer_data(ctx->changed_pixels, NULL));
-        eina_spinlock_take(ctx->lock);
-        evas_software_xlib_x_output_buffer_unref(ctx->changed_pixels, 0);
-        eina_spinlock_release(ctx->lock);
-     }
-   free(ctx);
-}
-
-void
-evas_software_x11_region_push_hook_call(Outbuf *buf, int x, int y, void 
*out_buf,
-                                        Eina_Spinlock *lock)
-{
-   Region_Push_Hook_Ctx *ctx;
-
-   if (!buf->region_push_hook.cb)
-     return;
-
-   ctx = malloc(sizeof(Region_Push_Hook_Ctx));
-   EINA_SAFETY_ON_NULL_RETURN(ctx);
-   ctx->x = x;
-   ctx->y = y;
-   ctx->region_push_hook.cb = buf->region_push_hook.cb;
-   ctx->region_push_hook.evas = buf->region_push_hook.evas;
-   ctx->changed_pixels = evas_software_xlib_x_output_buffer_ref(out_buf);
-   ctx->buf = buf;
-   ctx->lock = lock;
-   
ecore_main_loop_thread_safe_call_async(_evas_software_x11_region_push_hook_call,
-                                          ctx);
-}
-
 static void
 _output_egl_shutdown(Render_Engine *re)
 {
@@ -361,8 +307,6 @@ eng_setup(void *in, unsigned int w, unsigned int h)
                                 info->info.destination_alpha);
         re->outbuf_alpha_get = evas_software_xlib_outbuf_alpha_get;
      }
-   re->generic.ob->region_push_hook.cb = info->func.region_push_hook;
-   re->generic.ob->region_push_hook.evas = info->push_to;
 
    _outbufs =  eina_list_append(_outbufs, re->generic.ob);
 
@@ -421,8 +365,6 @@ eng_update(void *data, void *in, unsigned int w, unsigned 
int h)
    if (ob)
      {
         evas_render_engine_software_generic_update(&re->generic, ob, w, h);
-        ob->region_push_hook.cb = info->func.region_push_hook;
-        ob->region_push_hook.evas = info->push_to;
      }
 
    _outbufs =  eina_list_append(_outbufs, re->generic.ob);
diff --git a/src/modules/evas/engines/software_x11/evas_engine.h 
b/src/modules/evas/engines/software_x11/evas_engine.h
index bf1222d..d5e4c7c 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.h
+++ b/src/modules/evas/engines/software_x11/evas_engine.h
@@ -88,15 +88,8 @@ struct _Outbuf
         unsigned char debug : 1;
         unsigned char synced : 1;
      } priv;
-   struct
-     {
-        void (*cb)(Evas *e, int x, int y, int w, int h, const void *pixels);
-        Evas *evas;
-     } region_push_hook;
 };
 
 void evas_software_xlib_x_init(void);
 
-void evas_software_x11_region_push_hook_call(Outbuf *buf, int x, int y, void 
*out_buf, Eina_Spinlock *lock);
-
 #endif
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c 
b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
index ce83881..76ac0ca 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
@@ -823,8 +823,6 @@ evas_software_xlib_outbuf_flush(Outbuf *buf, Tilebuf_Rect 
*surface_damage EINA_U
        XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, tmpr);
         if (obr->xob)
           {
-             evas_software_x11_region_push_hook_call(buf, 0, 0, obr->xob,
-                                                     &shmpool_lock);
              evas_software_xlib_x_output_buffer_paste(obr->xob, 
buf->priv.x11.xlib.win,
                                                       buf->priv.x11.xlib.gc,
                                                       0, 0, 0);
@@ -852,8 +850,6 @@ evas_software_xlib_outbuf_flush(Outbuf *buf, Tilebuf_Rect 
*surface_damage EINA_U
                                                   obr->x, obr->y, obr->w, 
obr->h);
              if (obr->xob)
                {
-                  evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
-                                                          obr->xob, 
&shmpool_lock);
                   evas_software_xlib_x_output_buffer_paste(obr->xob, 
buf->priv.x11.xlib.win,
                                                            
buf->priv.x11.xlib.gc,
                                                            obr->x, obr->y, 0);
@@ -1147,8 +1143,6 @@ evas_software_xlib_outbuf_push_updated_region(Outbuf 
*buf, RGBA_Image *update, i
                                                obr->x, obr->y, obr->w, obr->h);
         if (obr->xob)
           {
-             evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
-                                                     obr->xob, &shmpool_lock);
              evas_software_xlib_x_output_buffer_paste(obr->xob, 
buf->priv.x11.xlib.win,
                                                       buf->priv.x11.xlib.gc,
                                                       obr->x, obr->y, 0);

-- 


Reply via email to