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 *e, int x, int y, int w, int h, const void *pixels);
} func;
unsigned char mask_changed : 1;
# include <dlfcn.h>
#endif
+#include <Ecore.h>
+
Evas_Native_Tbm_Surface_Image_Set_Call glsym__evas_native_tbm_surface_image_set = NULL;
Evas_Native_Tbm_Surface_Stride_Get_Call glsym__evas_native_tbm_surface_stride_get = NULL;
int _evas_engine_soft_x11_log_dom = -1;
}
*/
+
+void
+evas_software_x11_region_push_hook_call(Outbuf *buf, int x, int y, int w, int h,
+ const void *pixels)
+{
+ int err;
+
+ if (!buf->region_push_hook.cb)
+ return;
+
+ err = ecore_thread_main_loop_begin();
+ EINA_SAFETY_ON_TRUE_RETURN(err == -1);
+ buf->region_push_hook.cb(buf->region_push_hook.evas, x, y, w, h, pixels);
+ ecore_thread_main_loop_end();
+}
+
static void
_output_egl_shutdown(Render_Engine *re)
{
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 = eo_e;
}
#endif
if (ob)
{
evas_render_engine_software_generic_update(&re->generic, ob, e->output.w, e->output.h);
+ ob->region_push_hook.cb = info->func.region_push_hook;
+ ob->region_push_hook.evas = eo_e;
}
/* if ((re) && (re->ob)) re->ob->onebuf = ponebuf; */
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_xcb_init(void);
+void evas_software_x11_region_push_hook_call(Outbuf *buf, int x, int y, int w, int h, const void *pixels);
+
#endif
pixman_region_n_rects(&tmpr),
(const xcb_rectangle_t *)pixman_region_rectangles(&tmpr, NULL));
if (obr->xcbob)
- evas_software_xcb_output_buffer_paste(obr->xcbob,
- buf->priv.x11.xcb.win,
- buf->priv.x11.xcb.gc, 0, 0, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, 0, 0, obr->xcbob->xim->width,
+ obr->xcbob->xim->height,
+ evas_software_xcb_output_buffer_data(obr->xcbob, NULL));
+ evas_software_xcb_output_buffer_paste(obr->xcbob,
+ buf->priv.x11.xcb.win,
+ buf->priv.x11.xcb.gc, 0, 0, 0);
+ }
if (obr->mask)
{
xcb_set_clip_rectangles(buf->priv.x11.xcb.conn,
evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win,
obr->x, obr->y, obr->w, obr->h);
if (obr->xcbob)
- evas_software_xcb_output_buffer_paste(obr->xcbob,
- buf->priv.x11.xcb.win,
- buf->priv.x11.xcb.gc,
- obr->x, obr->y, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
+ obr->xcbob->xim->width,
+ obr->xcbob->xim->height,
+ evas_software_xcb_output_buffer_data(obr->xcbob, NULL));
+ evas_software_xcb_output_buffer_paste(obr->xcbob,
+ buf->priv.x11.xcb.win,
+ buf->priv.x11.xcb.gc,
+ obr->x, obr->y, 0);
+ }
if (obr->mask)
evas_software_xcb_output_buffer_paste(obr->mask,
buf->priv.x11.xcb.mask,
evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win,
obr->x, obr->y, obr->w, obr->h);
if (obr->xcbob)
- evas_software_xcb_output_buffer_paste(obr->xcbob,
- buf->priv.x11.xcb.win,
- buf->priv.x11.xcb.gc,
- obr->x, obr->y, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
+ obr->xcbob->xim->width,
+ obr->xcbob->xim->height,
+ evas_software_xcb_output_buffer_data(obr->xcbob, NULL));
+ evas_software_xcb_output_buffer_paste(obr->xcbob,
+ buf->priv.x11.xcb.win,
+ buf->priv.x11.xcb.gc,
+ obr->x, obr->y, 0);
+ }
}
#endif
if (obr->mask)
eina_array_clean(&buf->priv.onebuf_regions);
XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, tmpr);
if (obr->xob)
- evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
- buf->priv.x11.xlib.gc,
- 0, 0, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, 0, 0, obr->xob->xim->width,
+ obr->xob->xim->height,
+ evas_software_xlib_x_output_buffer_data(obr->xob, NULL));
+ evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+ buf->priv.x11.xlib.gc,
+ 0, 0, 0);
+ }
if (obr->mxob)
{
XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gcm, tmpr);
evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win,
obr->x, obr->y, obr->w, obr->h);
if (obr->xob)
- evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
- buf->priv.x11.xlib.gc,
- obr->x, obr->y, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
+ obr->xob->xim->width,
+ obr->xob->xim->height,
+ evas_software_xlib_x_output_buffer_data(obr->xob, NULL));
+ evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+ buf->priv.x11.xlib.gc,
+ obr->x, obr->y, 0);
+ }
if (obr->mxob)
evas_software_xlib_x_output_buffer_paste(obr->mxob,
buf->priv.x11.xlib.mask,
evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win,
obr->x, obr->y, obr->w, obr->h);
if (obr->xob)
- evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
- buf->priv.x11.xlib.gc,
- obr->x, obr->y, 0);
+ {
+ evas_software_x11_region_push_hook_call(buf, obr->x, obr->y,
+ obr->xob->xim->width,
+ obr->xob->xim->height,
+ evas_software_xlib_x_output_buffer_data(obr->xob, NULL));
+ evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+ buf->priv.x11.xlib.gc,
+ obr->x, obr->y, 0);
+ }
}
#endif
if (obr->mxob)