forked from enlightenment/efl
evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs - this is useful to get timing right on the drm and wayland engines.
This commit is contained in:
parent
ce7991b993
commit
5eec34812e
|
@ -103,6 +103,7 @@ _output_setup(int w,
|
|||
evas_buffer_outbuf_buf_free_region_for_update,
|
||||
NULL,
|
||||
evas_buffer_outbuf_buf_switch_buffer,
|
||||
NULL,
|
||||
evas_buffer_outbuf_buf_free,
|
||||
w, h))
|
||||
goto on_error;
|
||||
|
|
|
@ -32,6 +32,7 @@ _render_engine_setup(Evas_Engine_Info_Drm *info, int w, int h)
|
|||
_outbuf_update_region_free,
|
||||
NULL,
|
||||
_outbuf_flush,
|
||||
NULL,
|
||||
_outbuf_free,
|
||||
ob->w, ob->h))
|
||||
goto init_err;
|
||||
|
|
|
@ -793,6 +793,7 @@ eng_setup(Evas *evas, void *in)
|
|||
evas_outbuf_update_region_free,
|
||||
NULL,
|
||||
evas_outbuf_flush,
|
||||
NULL,
|
||||
evas_outbuf_free,
|
||||
evas_outbuf_use,
|
||||
evas_outbuf_gl_context_get,
|
||||
|
|
|
@ -53,6 +53,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh)
|
|||
evas_fb_outbuf_fb_free_region_for_update,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
evas_fb_outbuf_fb_free,
|
||||
evas_fb_outbuf_fb_get_width(ob),
|
||||
evas_fb_outbuf_fb_get_height(ob)))
|
||||
|
|
|
@ -202,6 +202,7 @@ eng_setup(Evas *evas, void *in)
|
|||
evas_outbuf_update_region_free,
|
||||
NULL,
|
||||
evas_outbuf_flush,
|
||||
NULL,
|
||||
evas_outbuf_free,
|
||||
evas_outbuf_use,
|
||||
evas_outbuf_gl_context_get,
|
||||
|
|
|
@ -915,6 +915,7 @@ eng_setup(Evas *evas, void *in)
|
|||
evas_outbuf_update_region_free,
|
||||
NULL,
|
||||
evas_outbuf_flush,
|
||||
NULL,
|
||||
evas_outbuf_free,
|
||||
evas_outbuf_use,
|
||||
evas_outbuf_gl_context_get,
|
||||
|
|
|
@ -51,6 +51,7 @@ evas_render_engine_gl_generic_init(Render_Engine_GL_Generic *re,
|
|||
Outbuf_Free_Region_For_Update outbuf_free_region_for_update,
|
||||
Outbuf_Idle_Flush outbuf_idle_flush,
|
||||
Outbuf_Flush outbuf_flush,
|
||||
Outbuf_Redraws_Clear outbuf_redraws_clear,
|
||||
Outbuf_Free outbuf_free,
|
||||
Window_Use window_use,
|
||||
Window_GL_Context_Get window_gl_context_get,
|
||||
|
@ -71,6 +72,7 @@ evas_render_engine_gl_generic_init(Render_Engine_GL_Generic *re,
|
|||
outbuf_free_region_for_update,
|
||||
outbuf_idle_flush,
|
||||
outbuf_flush,
|
||||
outbuf_redraws_clear,
|
||||
outbuf_free,
|
||||
w, h))
|
||||
return EINA_FALSE;
|
||||
|
|
|
@ -316,6 +316,7 @@ eng_setup(Evas *eo_e, void *in)
|
|||
_outbuf_free_region_for_update,
|
||||
NULL,
|
||||
_outbuf_flush,
|
||||
NULL,
|
||||
_outbuf_free,
|
||||
_window_use,
|
||||
_window_gl_context_get,
|
||||
|
|
|
@ -1727,6 +1727,7 @@ eng_setup(Evas *eo_e, void *in)
|
|||
eng_outbuf_push_free_region_for_update,
|
||||
eng_outbuf_idle_flush,
|
||||
eng_outbuf_flush,
|
||||
NULL,
|
||||
eng_window_free,
|
||||
eng_window_use,
|
||||
eng_outbuf_gl_context_get,
|
||||
|
|
|
@ -53,6 +53,7 @@ _output_setup(int width,
|
|||
evas_software_ddraw_outbuf_free_region_for_update,
|
||||
evas_software_ddraw_outbuf_idle_flush,
|
||||
evas_software_ddraw_outbuf_flush,
|
||||
NULL,
|
||||
evas_software_ddraw_outbuf_free,
|
||||
width, height))
|
||||
goto on_error;
|
||||
|
|
|
@ -59,6 +59,7 @@ _output_setup(int width,
|
|||
evas_software_gdi_outbuf_free_region_for_update,
|
||||
evas_software_gdi_outbuf_idle_flush,
|
||||
evas_software_gdi_outbuf_flush,
|
||||
NULL,
|
||||
evas_software_gdi_outbuf_free,
|
||||
width, height))
|
||||
goto on_error;
|
||||
|
|
|
@ -54,6 +54,7 @@ typedef void (*Outbuf_Free_Region_For_Update)(Outbuf *ob, RGBA_Image *update);
|
|||
typedef void (*Outbuf_Free)(Outbuf *ob);
|
||||
typedef int (*Outbuf_Get_Rot)(Outbuf *ob);
|
||||
typedef void (*Outbuf_Flush)(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
|
||||
typedef void (*Outbuf_Redraws_Clear)(Outbuf *ob);
|
||||
|
||||
struct _Render_Engine_Software_Generic
|
||||
{
|
||||
|
@ -74,6 +75,7 @@ struct _Render_Engine_Software_Generic
|
|||
Outbuf_Free_Region_For_Update outbuf_free_region_for_update;
|
||||
Outbuf_Free outbuf_free;
|
||||
Outbuf_Flush outbuf_flush;
|
||||
Outbuf_Redraws_Clear outbuf_redraws_clear;
|
||||
|
||||
unsigned int w, h;
|
||||
|
||||
|
@ -98,6 +100,7 @@ evas_render_engine_software_generic_init(Render_Engine_Software_Generic *re,
|
|||
Outbuf_Free_Region_For_Update outbuf_free_region_for_update,
|
||||
Outbuf_Idle_Flush outbuf_idle_flush,
|
||||
Outbuf_Flush outbuf_flush,
|
||||
Outbuf_Redraws_Clear outbuf_redraws_clear,
|
||||
Outbuf_Free outbuf_free,
|
||||
int w, int h)
|
||||
{
|
||||
|
@ -115,6 +118,7 @@ evas_render_engine_software_generic_init(Render_Engine_Software_Generic *re,
|
|||
re->outbuf_free_region_for_update = outbuf_free_region_for_update;
|
||||
re->outbuf_free = outbuf_free;
|
||||
re->outbuf_flush = outbuf_flush;
|
||||
re->outbuf_redraws_clear = outbuf_redraws_clear;
|
||||
|
||||
re->rects = NULL;
|
||||
for (i = 0; i < 4; i++)
|
||||
|
|
|
@ -3877,6 +3877,7 @@ eng_output_redraws_clear(void *data)
|
|||
|
||||
re = (Render_Engine_Software_Generic *)data;
|
||||
evas_common_tilebuf_clear(re->tb);
|
||||
if (re->outbuf_redraws_clear) re->outbuf_redraws_clear(re->ob);
|
||||
}
|
||||
|
||||
static Tilebuf_Rect *
|
||||
|
|
|
@ -186,6 +186,7 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw,
|
|||
evas_software_xlib_outbuf_free_region_for_update,
|
||||
evas_software_xlib_outbuf_idle_flush,
|
||||
evas_software_xlib_outbuf_flush,
|
||||
NULL,
|
||||
evas_software_xlib_outbuf_free,
|
||||
w, h))
|
||||
goto on_error;
|
||||
|
@ -247,6 +248,7 @@ _output_swapbuf_setup(int w, int h, int rot, Display *disp, Drawable draw,
|
|||
evas_software_xlib_swapbuf_free_region_for_update,
|
||||
evas_software_xlib_swapbuf_idle_flush,
|
||||
evas_software_xlib_swapbuf_flush,
|
||||
NULL,
|
||||
evas_software_xlib_swapbuf_free,
|
||||
w, h))
|
||||
goto on_error;
|
||||
|
@ -305,6 +307,7 @@ _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn,
|
|||
evas_software_xcb_outbuf_free_region_for_update,
|
||||
evas_software_xcb_outbuf_idle_flush,
|
||||
evas_software_xcb_outbuf_flush,
|
||||
NULL,
|
||||
evas_software_xcb_outbuf_free,
|
||||
w, h))
|
||||
goto on_error;
|
||||
|
|
|
@ -597,6 +597,7 @@ eng_setup(Evas *evas, void *info)
|
|||
eng_outbuf_update_region_free,
|
||||
NULL,
|
||||
eng_outbuf_flush,
|
||||
NULL,
|
||||
eng_window_free,
|
||||
eng_window_use,
|
||||
eng_outbuf_gl_context_get,
|
||||
|
|
|
@ -55,6 +55,7 @@ _render_engine_swapbuf_setup(int w, int h, Evas_Engine_Info_Wayland_Shm *einfo)
|
|||
_evas_outbuf_update_region_free,
|
||||
_evas_outbuf_idle_flush,
|
||||
_evas_outbuf_flush,
|
||||
NULL,
|
||||
_evas_outbuf_free,
|
||||
w, h))
|
||||
goto err;
|
||||
|
|
Loading…
Reference in New Issue