forked from enlightenment/efl
evas: remove pixels hook from x11 backend now that we don't use it anymore
This commit is contained in:
parent
323063a370
commit
12fcaf77d6
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue