evas: remove pixels hook from fb now that we don't use it anymore.

This commit is contained in:
Cedric BAIL 2017-03-22 12:56:08 -07:00
parent e0bb9d6134
commit 323063a370
4 changed files with 5 additions and 84 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
}
}
}