cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=323063a37079bee2c40eb3e0672cc015d4350c84
commit 323063a37079bee2c40eb3e0672cc015d4350c84 Author: Cedric BAIL <[email protected]> Date: Wed Mar 22 12:56:08 2017 -0700 evas: remove pixels hook from fb now that we don't use it anymore. --- src/modules/evas/engines/fb/Evas_Engine_FB.h | 6 --- src/modules/evas/engines/fb/evas_engine.c | 71 ++-------------------------- src/modules/evas/engines/fb/evas_engine.h | 11 +---- src/modules/evas/engines/fb/evas_outbuf.c | 1 - 4 files changed, 5 insertions(+), 84 deletions(-) diff --git a/src/modules/evas/engines/fb/Evas_Engine_FB.h b/src/modules/evas/engines/fb/Evas_Engine_FB.h index 4c43096..2679160 100644 --- a/src/modules/evas/engines/fb/Evas_Engine_FB.h +++ b/src/modules/evas/engines/fb/Evas_Engine_FB.h @@ -19,11 +19,5 @@ struct _Evas_Engine_Info_FB /* non-blocking or blocking mode */ Evas_Engine_Render_Mode render_mode; - - struct { - void (*region_push_hook)(Evas *push_to, int x, int y, int w, int h, const void *pixels); - } func; - - Evas *push_to; }; #endif diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c index b87a7aa..e5dbbee 100644 --- a/src/modules/evas/engines/fb/evas_engine.c +++ b/src/modules/evas/engines/fb/evas_engine.c @@ -21,77 +21,16 @@ struct _Render_Engine Render_Engine_Software_Generic generic; }; -typedef struct _Region_Push_Hook_Ctx { - void *pixels; - Outbuf *buf; - int x; - int y; - int w; - int h; -} Region_Push_Hook_Ctx; - /* prototypes we will use here */ -static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh, - void (*region_push_hook)(Evas *e, int x, int y, int w, int h, - const void *pixels), - Evas *push_to); +static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh); static void *eng_info(Evas *eo_e); static void eng_info_free(Evas *eo_e, void *info); static void eng_output_free(void *data); -static void -_evas_fb_region_push_hook_call(void *data) -{ - Region_Push_Hook_Ctx *ctx = data; - - - if (eina_list_data_find(_outbufs, ctx->buf)) - { - ctx->buf->region_push_hook.cb(ctx->buf->region_push_hook.evas, - ctx->x, ctx->y, ctx->w, ctx->h, - ctx->pixels); - } - - free(ctx->pixels); - free(ctx); -} - -void -evas_fb_region_push_hook_call(Outbuf *buf, int x, int y, int w, int h, - const void *pixels) -{ - Region_Push_Hook_Ctx *ctx; - size_t s; - - if (!buf->region_push_hook.cb) - return; - - s = w * h * buf->priv.fb.fb->bpp; - ctx = malloc(sizeof(Region_Push_Hook_Ctx)); - EINA_SAFETY_ON_NULL_RETURN(ctx); - ctx->pixels = malloc(s); - EINA_SAFETY_ON_NULL_GOTO(ctx->pixels, err_pixels); - ctx->x = x; - ctx->y = y; - ctx->w = w; - ctx->h = h; - ctx->buf = buf; - memcpy(ctx->pixels, pixels, s); - - ecore_main_loop_thread_safe_call_async(_evas_fb_region_push_hook_call, ctx); - return; - - err_pixels: - free(ctx); -} - /* internal engine routines */ static void * -_output_setup(int w, int h, int rot, int vt, int dev, int refresh, - void (*region_push_hook)(Evas *e, int x, int y, int w, int h, - const void *pixels), - Evas *push_to) +_output_setup(int w, int h, int rot, int vt, int dev, int refresh) { Render_Engine *re; Outbuf *ob; @@ -106,8 +45,6 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh, ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, refresh); if (!ob) goto on_error; - ob->region_push_hook.cb = region_push_hook; - ob->region_push_hook.evas = push_to; if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL, evas_fb_outbuf_fb_get_rot, evas_fb_outbuf_fb_reconfigure, @@ -165,9 +102,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) info->info.rotation, info->info.virtual_terminal, info->info.device_number, - info->info.refresh, - info->func.region_push_hook, - info->push_to); + info->info.refresh); } static void diff --git a/src/modules/evas/engines/fb/evas_engine.h b/src/modules/evas/engines/fb/evas_engine.h index 44e4991..e6df5b8 100644 --- a/src/modules/evas/engines/fb/evas_engine.h +++ b/src/modules/evas/engines/fb/evas_engine.h @@ -39,18 +39,13 @@ struct _Outbuf struct { struct { - FB_Mode *fb; + FB_Mode *fb; } fb; struct { - DATA32 r, g, b; + DATA32 r, g, b; } mask; RGBA_Image *back_buf; } priv; - - struct { - void (*cb)(Evas *e, int x, int y, int w, int h, const void *pixels); - Evas *evas; - } region_push_hook; }; /****/ @@ -73,6 +68,4 @@ int evas_fb_outbuf_fb_get_rot (Outbuf *buf); int evas_fb_outbuf_fb_get_have_backbuf (Outbuf *buf); void evas_fb_outbuf_fb_set_have_backbuf (Outbuf *buf, int have_backbuf); -void evas_fb_region_push_hook_call(Outbuf *buf, int x, int y, int w, int h, const void *pixels); - #endif diff --git a/src/modules/evas/engines/fb/evas_outbuf.c b/src/modules/evas/engines/fb/evas_outbuf.c index 46b0441..7727428 100644 --- a/src/modules/evas/engines/fb/evas_outbuf.c +++ b/src/modules/evas/engines/fb/evas_outbuf.c @@ -357,7 +357,6 @@ evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, in h, w, x, y, NULL); } - evas_fb_region_push_hook_call(buf, x, y, w, h, src_data); } } } --
