evas_buffer_outbuf_buf_swap_mode_get,
evas_buffer_outbuf_buf_rot_get,
evas_buffer_outbuf_reconfigure,
+ NULL,
evas_buffer_outbuf_buf_new_region_for_update,
evas_buffer_outbuf_buf_push_updated_region,
evas_buffer_outbuf_buf_free_region_for_update,
evas_outbuf_buffer_state_get,
evas_outbuf_get_rot,
evas_outbuf_reconfigure,
+ NULL,
evas_outbuf_update_region_new,
evas_outbuf_update_region_push,
evas_outbuf_update_region_free,
if (ob) return 0;
/* if we have an existing outbuf, free it */
- evas_render_engine_software_generic_update(&re->generic, ob);
+ evas_render_engine_software_generic_update(&re->generic, ob, epd->output.w, epd->output.h);
}
/* update the info structure pointer */
void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob);
int evas_outbuf_get_rot(Outbuf *ob);
-RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
+void *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
-void evas_outbuf_flush(Outbuf *ob);
+void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
Eina_Bool evas_drm_init(Evas_Engine_Info_Drm *info);
Eina_Bool evas_drm_shutdown(Evas_Engine_Info_Drm *info);
return MODE_FULL;
}
-RGBA_Image *
+void *
evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
RGBA_Image *img = NULL;
/* evas_cache_image_drop(&update->cache_entry); */
}
-void
-evas_outbuf_flush(Outbuf *ob)
+void
+evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
{
- Eina_Rectangle *rects;
+ Eina_Rectangle *r;
RGBA_Image *img;
unsigned int n = 0, i = 0;
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
/* get number of pending writes */
n = eina_list_count(ob->priv.pending_writes);
if (n == 0) return;
/* allocate rectangles */
- if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return;
+ if (!(r = alloca(n * sizeof(Eina_Rectangle)))) return;
/* loop the pending writes */
EINA_LIST_FREE(ob->priv.pending_writes, img)
/* based on rotation, set rectangle position */
if (ob->rotation == 0)
{
- rects[i].x = x;
- rects[i].y = y;
+ r[i].x = x;
+ r[i].y = y;
}
else if (ob->rotation == 90)
{
- rects[i].x = y;
- rects[i].y = (ob->w - x - w);
+ r[i].x = y;
+ r[i].y = (ob->w - x - w);
}
else if (ob->rotation == 180)
{
- rects[i].x = (ob->w - x - w);
- rects[i].y = (ob->h - y - h);
+ r[i].x = (ob->w - x - w);
+ r[i].y = (ob->h - y - h);
}
else if (ob->rotation == 270)
{
- rects[i].x = (ob->h - y - h);
- rects[i].y = x;
+ r[i].x = (ob->h - y - h);
+ r[i].y = x;
}
/* based on rotation, set rectangle size */
if ((ob->rotation == 0) || (ob->rotation == 180))
{
- rects[i].w = w;
- rects[i].h = h;
+ r[i].w = w;
+ r[i].h = h;
}
else if ((ob->rotation == 90) || (ob->rotation == 270))
{
- rects[i].w = h;
- rects[i].h = w;
+ r[i].w = h;
+ r[i].h = w;
}
eina_rectangle_free(rect);
}
/* force a buffer swap */
- _evas_outbuf_buffer_swap(ob, rects, n);
+ _evas_outbuf_buffer_swap(ob, r, n);
}
int
if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
evas_fb_outbuf_fb_get_rot,
evas_fb_outbuf_fb_reconfigure,
+ NULL,
evas_fb_outbuf_fb_new_region_for_update,
evas_fb_outbuf_fb_push_updated_region,
evas_fb_outbuf_fb_free_region_for_update,
void evas_fb_outbuf_fb_blit (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
void evas_fb_outbuf_fb_update (Outbuf *buf, int x, int y, int w, int h);
-RGBA_Image *evas_fb_outbuf_fb_new_region_for_update (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
+void *evas_fb_outbuf_fb_new_region_for_update (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void evas_fb_outbuf_fb_free_region_for_update (Outbuf *buf, RGBA_Image *update);
void evas_fb_outbuf_fb_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
void evas_fb_outbuf_fb_reconfigure (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
}
}
-RGBA_Image *
+void *
evas_fb_outbuf_fb_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
if (buf->priv.back_buf)
void evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf,
RGBA_Image *update);
-void evas_software_ddraw_outbuf_flush(Outbuf *buf);
+void evas_software_ddraw_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode);
void evas_software_ddraw_outbuf_idle_flush(Outbuf *buf);
}
void
-evas_software_ddraw_outbuf_flush(Outbuf *buf)
+evas_software_ddraw_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode)
{
Eina_List *l;
RGBA_Image *im;
int ddraw_pitch;
int ddraw_depth;
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
/* lock the back surface */
if (!(ddraw_data = evas_software_ddraw_lock(buf,
&ddraw_width,
void evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf,
RGBA_Image *update);
-void evas_software_gdi_outbuf_flush(Outbuf *buf);
+void evas_software_gdi_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode);
void evas_software_gdi_outbuf_idle_flush(Outbuf *buf);
}
void
-evas_software_gdi_outbuf_flush(Outbuf *buf)
+evas_software_gdi_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode)
{
Eina_List *l;
RGBA_Image *im;
Outbuf_Region *obr;
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
/* copy safely the images that need to be drawn onto the back surface */
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
MODE_COPY,
MODE_DOUBLE,
MODE_TRIPLE,
- MODE_QUADRUPLE
+ MODE_QUADRUPLE,
+ MODE_AUTO
} Render_Engine_Swap_Mode;
typedef enum {
typedef Render_Engine_Swap_Mode (*Outbuf_Swap_Mode_Get)(Outbuf *ob);
typedef void (*Outbuf_Reconfigure)(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
-typedef RGBA_Image *(*Outbuf_New_Region_For_Update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
+typedef Eina_Bool (*Outbuf_Region_First_Rect)(Outbuf *ob);
+typedef void *(*Outbuf_New_Region_For_Update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
typedef void (*Outbuf_Push_Updated_Region)(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
typedef void (*Outbuf_Idle_Flush)(Outbuf *ob);
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);
+typedef void (*Outbuf_Flush)(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
struct _Render_Engine_Software_Generic
{
Outbuf_Swap_Mode_Get outbuf_swap_mode_get;
Outbuf_Get_Rot outbuf_get_rot;
Outbuf_Reconfigure outbuf_reconfigure;
+ Outbuf_Region_First_Rect outbuf_region_first_rect;
Outbuf_New_Region_For_Update outbuf_new_region_for_update;
Outbuf_Push_Updated_Region outbuf_push_updated_region;
Outbuf_Idle_Flush outbuf_idle_flush;
unsigned char end : 1;
unsigned char lost_back : 1;
+ unsigned char tile_strict : 1;
};
static inline Eina_Bool
Outbuf_Swap_Mode_Get outbuf_swap_mode_get,
Outbuf_Get_Rot outbuf_get_rot,
Outbuf_Reconfigure outbuf_reconfigure,
+ Outbuf_Region_First_Rect outbuf_region_first_rect,
Outbuf_New_Region_For_Update outbuf_new_region_for_update,
Outbuf_Push_Updated_Region outbuf_push_updated_region,
Outbuf_Free_Region_For_Update outbuf_free_region_for_update,
re->outbuf_swap_mode_get = outbuf_swap_mode_get;
re->outbuf_get_rot = outbuf_get_rot;
re->outbuf_reconfigure = outbuf_reconfigure;
+ re->outbuf_region_first_rect = outbuf_region_first_rect;
re->outbuf_new_region_for_update = outbuf_new_region_for_update;
re->outbuf_push_updated_region = outbuf_push_updated_region;
re->outbuf_idle_flush = outbuf_idle_flush;
re->merge_mode = MERGE_FULL;
re->end = 0;
re->lost_back = 0;
+ re->tile_strict = 0;
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb) return EINA_FALSE;
}
static inline void
-evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
- Outbuf *ob)
+evas_render_engine_software_generic_merge_mode_set(Render_Engine_Software_Generic *re,
+ Render_Engine_Merge_Mode merge_mode)
{
- if (re->ob) re->outbuf_free(re->ob);
- re->ob = ob;
+ re->merge_mode = merge_mode;
}
static inline void
-evas_render_engine_software_generic_merge_mode_set(Render_Engine_Software_Generic *re,
- Render_Engine_Merge_Mode merge_mode)
+evas_render_engine_software_generic_tile_strict_set(Render_Engine_Software_Generic *re,
+ Eina_Bool tile_strict)
{
- re->merge_mode = merge_mode;
+ re->tile_strict = !!tile_strict;
+ evas_common_tilebuf_tile_strict_set(re->tb, re->tile_strict);
+}
+
+static inline Eina_Bool
+evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
+ Outbuf *ob,
+ int w, int h)
+{
+ if (re->ob) re->outbuf_free(re->ob);
+ re->ob = ob;
+
+ evas_common_tilebuf_free(re->tb);
+ re->tb = evas_common_tilebuf_new(w, h);
+ if (!re->tb) return EINA_FALSE;
+ evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+ evas_render_engine_software_generic_tile_strict_set(re, re->tile_strict);
+ return EINA_TRUE;
}
#endif
re->tb = evas_common_tilebuf_new(w, h);
if (re->tb)
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+ evas_common_tilebuf_tile_strict_set(re->tb, re->tile_strict);
re->w = w;
re->h = h;
}
eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch)
{
Render_Engine_Software_Generic *re;
- RGBA_Image *surface;
+ void *surface;
Tilebuf_Rect *rect;
- Eina_Bool first_rect = EINA_FALSE;
#define CLEAR_PREV_RECTS(x) \
do { \
re->rects = evas_common_tilebuf_get_render_rects(re->tb);
if (re->rects)
{
+ // do anything needed for the first rect and update lost backbuffer if needed
+ if (re->outbuf_region_first_rect)
+ re->lost_back |= re->outbuf_region_first_rect(re->ob);
+
if (re->outbuf_swap_mode_get) mode = re->outbuf_swap_mode_get(re->ob);
re->swap_mode = mode;
- if ((re->lost_back) || (re->swap_mode == MODE_FULL))
+ if ((re->lost_back) || (re->swap_mode == MODE_FULL) || (re->swap_mode == MODE_AUTO))
{
/* if we lost our backbuffer since the last frame redraw all */
re->lost_back = 0;
re->rects = NULL;
switch (re->swap_mode)
{
+ case MODE_AUTO:
case MODE_FULL:
case MODE_COPY: // no prev rects needed
re->rects = _merge_rects(re->merge_mode, re->tb, re->rects_prev[0], NULL, NULL, NULL);
default:
break;
}
- first_rect = EINA_TRUE;
}
evas_common_tilebuf_clear(re->tb);
re->cur_rect = EINA_INLIST_GET(re->rects);
*ch = rect->h;
re->cur_rect = re->cur_rect->next;
break;
+ case MODE_AUTO:
case MODE_FULL:
re->cur_rect = NULL;
if (x) *x = 0;
default:
break;
}
- if (first_rect)
- {
- // do anything needed fir the first frame
- }
surface = re->outbuf_new_region_for_update(re->ob,
*x, *y, *w, *h,
cx, cy, cw, ch);
if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
re = (Render_Engine_Software_Generic *)data;
- if (re->outbuf_flush) re->outbuf_flush(re->ob);
- if (re->rects)
+ if (re->outbuf_flush) re->outbuf_flush(re->ob, re->rects, render_mode);
+ if (re->rects && render_mode != EVAS_RENDER_MODE_ASYNC_INIT)
{
evas_common_tilebuf_free_render_rects(re->rects);
re->rects = NULL;
if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
evas_software_xlib_outbuf_get_rot,
evas_software_xlib_outbuf_reconfigure,
+ NULL,
evas_software_xlib_outbuf_new_region_for_update,
evas_software_xlib_outbuf_push_updated_region,
evas_software_xlib_outbuf_free_region_for_update,
evas_software_xlib_swapbuf_buffer_state_get,
evas_software_xlib_swapbuf_get_rot,
evas_software_xlib_swapbuf_reconfigure,
+ NULL,
evas_software_xlib_swapbuf_new_region_for_update,
evas_software_xlib_swapbuf_push_updated_region,
evas_software_xlib_swapbuf_free_region_for_update,
if (!evas_render_engine_software_generic_init(re, ob, NULL,
evas_software_xcb_outbuf_rotation_get,
evas_software_xcb_outbuf_reconfigure,
+ NULL,
evas_software_xcb_outbuf_new_region_for_update,
evas_software_xcb_outbuf_push_updated_region,
evas_software_xcb_outbuf_free_region_for_update,
if (ob)
{
- evas_render_engine_software_generic_update(&re->generic, ob);
+ evas_render_engine_software_generic_update(&re->generic, ob, e->output.w, e->output.h);
}
/* if ((re) && (re->ob)) re->ob->onebuf = ponebuf; */
return buf;
}
-RGBA_Image *
+void *
evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
RGBA_Image *im = NULL;
}
void
-evas_software_xcb_outbuf_flush(Outbuf *buf)
+evas_software_xcb_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode)
{
Eina_List *l = NULL;
RGBA_Image *im = NULL;
Outbuf_Region *obr = NULL;
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
if ((buf->priv.onebuf) && (eina_array_count(&buf->priv.onebuf_regions)))
{
Eina_Array_Iterator it;
void evas_software_xcb_outbuf_init(void);
void evas_software_xcb_outbuf_free(Outbuf *buf);
Outbuf *evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int xdepth, Eina_Bool grayscale, int max_colors, xcb_drawable_t mask, Eina_Bool shape_dither, Eina_Bool alpha);
-RGBA_Image *evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
+void *evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf, RGBA_Image *update);
-void evas_software_xcb_outbuf_flush(Outbuf *buf);
+void evas_software_xcb_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
void evas_software_xcb_outbuf_idle_flush(Outbuf *buf);
void evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
void evas_software_xcb_outbuf_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
free(obr);
}
evas_software_xlib_outbuf_idle_flush(buf);
- evas_software_xlib_outbuf_flush(buf);
+ evas_software_xlib_outbuf_flush(buf, NULL, MODE_FULL);
if (buf->priv.x11.xlib.gc)
XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc);
if (buf->priv.x11.xlib.gcm)
return buf;
}
-RGBA_Image *
+void *
evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
RGBA_Image *im;
}
void
-evas_software_xlib_outbuf_flush(Outbuf *buf)
+evas_software_xlib_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
{
Eina_List *l;
RGBA_Image *im;
Outbuf_Region *obr;
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
if ((buf->priv.onebuf) && eina_array_count(&buf->priv.onebuf_regions))
{
Eina_Rectangle *rect;
int destination_alpha);
-RGBA_Image *evas_software_xlib_outbuf_new_region_for_update (Outbuf *buf,
- int x,
- int y,
- int w,
- int h,
- int *cx,
- int *cy,
- int *cw,
- int *ch);
+void *evas_software_xlib_outbuf_new_region_for_update (Outbuf *buf,
+ int x,
+ int y,
+ int w,
+ int h,
+ int *cx,
+ int *cy,
+ int *cw,
+ int *ch);
void evas_software_xlib_outbuf_free_region_for_update (Outbuf *buf,
RGBA_Image *update);
-void evas_software_xlib_outbuf_flush (Outbuf *buf);
+void evas_software_xlib_outbuf_flush (Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
void evas_software_xlib_outbuf_idle_flush (Outbuf *buf);
void
evas_software_xlib_swapbuf_free(Outbuf *buf)
{
- evas_software_xlib_swapbuf_flush(buf);
+ evas_software_xlib_swapbuf_flush(buf, NULL, MODE_FULL);
evas_software_xlib_swapbuf_idle_flush(buf);
if (buf->priv.pal)
evas_software_xlib_x_color_deallocate
return buf;
}
-RGBA_Image *
+void *
evas_software_xlib_swapbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h);
}
void
-evas_software_xlib_swapbuf_flush(Outbuf *buf)
+evas_software_xlib_swapbuf_flush(Outbuf *buf, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode EINA_UNUSED)
{
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
if (!buf->priv.pending_writes)
{
- Eina_Rectangle *rects, *rect;
+ Eina_Rectangle *result, *rect;
Eina_Array_Iterator it;
unsigned int n, i;
RGBA_Image *im;
n = eina_array_count_get(&buf->priv.onebuf_regions);
if (n == 0) return;
- rects = alloca(n * sizeof(Eina_Rectangle));
+ result = alloca(n * sizeof(Eina_Rectangle));
EINA_ARRAY_ITER_NEXT(&buf->priv.onebuf_regions, i, rect, it)
{
- rects[i] = *rect;
+ result[i] = *rect;
eina_rectangle_free(rect);
}
evas_xlib_swapper_buffer_unmap(buf->priv.swapper);
- evas_xlib_swapper_swap(buf->priv.swapper, rects, n);
+ evas_xlib_swapper_swap(buf->priv.swapper, result, n);
eina_array_clean(&buf->priv.onebuf_regions);
im = buf->priv.onebuf;
buf->priv.onebuf = NULL;
else
{
RGBA_Image *im;
- Eina_Rectangle *rects;
+ Eina_Rectangle *result;
unsigned int n, i = 0;
n = eina_list_count(buf->priv.pending_writes);
if (n == 0) return;
- rects = alloca(n * sizeof(Eina_Rectangle));
+ result = alloca(n * sizeof(Eina_Rectangle));
EINA_LIST_FREE(buf->priv.pending_writes, im)
{
Eina_Rectangle *rect = im->extended_info;
x = rect->x; y = rect->y; w = rect->w; h = rect->h;
if (buf->rot == 0)
{
- rects[i].x = x;
- rects[i].y = y;
+ result[i].x = x;
+ result[i].y = y;
}
else if (buf->rot == 90)
{
- rects[i].x = y;
- rects[i].y = buf->w - x - w;
+ result[i].x = y;
+ result[i].y = buf->w - x - w;
}
else if (buf->rot == 180)
{
- rects[i].x = buf->w - x - w;
- rects[i].y = buf->h - y - h;
+ result[i].x = buf->w - x - w;
+ result[i].y = buf->h - y - h;
}
else if (buf->rot == 270)
{
- rects[i].x = buf->h - y - h;
- rects[i].y = x;
+ result[i].x = buf->h - y - h;
+ result[i].y = x;
}
if ((buf->rot == 0) || (buf->rot == 180))
{
- rects[i].w = w;
- rects[i].h = h;
+ result[i].w = w;
+ result[i].h = h;
}
else if ((buf->rot == 90) || (buf->rot == 270))
{
- rects[i].w = h;
- rects[i].h = w;
+ result[i].w = h;
+ result[i].h = w;
}
eina_rectangle_free(rect);
#ifdef EVAS_CSERVE2
i++;
}
evas_xlib_swapper_buffer_unmap(buf->priv.swapper);
- evas_xlib_swapper_swap(buf->priv.swapper, rects, n);
+ evas_xlib_swapper_swap(buf->priv.swapper, result, n);
// evas_xlib_swapper_swap(buf->priv.swapper, NULL, 0);
}
}
Pixmap mask,
int shape_dither,
int destination_alpha);
-RGBA_Image *evas_software_xlib_swapbuf_new_region_for_update(Outbuf *buf,
- int x,
- int y,
- int w,
- int h,
- int *cx,
- int *cy,
- int *cw,
- int *ch);
+void *evas_software_xlib_swapbuf_new_region_for_update(Outbuf *buf,
+ int x,
+ int y,
+ int w,
+ int h,
+ int *cx,
+ int *cy,
+ int *cw,
+ int *ch);
void evas_software_xlib_swapbuf_free_region_for_update(Outbuf *buf,
RGBA_Image *update);
-void evas_software_xlib_swapbuf_flush(Outbuf *buf);
+void evas_software_xlib_swapbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
void evas_software_xlib_swapbuf_idle_flush(Outbuf *buf);
void evas_software_xlib_swapbuf_push_updated_region(Outbuf *buf,
RGBA_Image *update,
evas_swapbuf_state_get,
evas_swapbuf_rotation_get,
NULL,
+ NULL,
evas_swapbuf_update_region_new,
evas_swapbuf_update_region_push,
evas_swapbuf_update_region_free,
info->info.wl_surface);
if (!ob) return 0;
- evas_render_engine_software_generic_update(&re->generic, ob);
+ evas_render_engine_software_generic_update(&re->generic, ob, epd->output.w, epd->output.h);
if ((re) && (re->generic.ob)) re->generic.ob->onebuf = ponebuf;
}
if (!ob) return;
/* flush the output buffer */
- evas_swapbuf_flush(ob);
+ evas_swapbuf_flush(ob, NULL, MODE_FULL);
evas_swapbuf_idle_flush(ob);
evas_swapper_free(ob->priv.swapper);
eina_array_flush(&ob->priv.onebuf_regions);
}
}
-RGBA_Image *
+void *
evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
RGBA_Image *img;
}
void
-evas_swapbuf_flush(Outbuf *ob)
+evas_swapbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
{
- Eina_Rectangle *rects;
+ Eina_Rectangle *result;
RGBA_Image *img;
unsigned int n = 0, i = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
+
/* check for valid output buffer */
if (!ob) return;
if (n == 0) return;
/* allocate rectangles */
- if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return;
+ if (!(result = alloca(n * sizeof(Eina_Rectangle)))) return;
- /* loop the buffer regions and assign to rects */
+ /* loop the buffer regions and assign to result */
EINA_ARRAY_ITER_NEXT(&ob->priv.onebuf_regions, i, rect, it)
- rects[i] = *rect;
+ result[i] = *rect;
/* unmap the buffer */
evas_swapper_buffer_unmap(ob->priv.swapper);
/* force a buffer swap */
- evas_swapper_swap(ob->priv.swapper, rects, n);
+ evas_swapper_swap(ob->priv.swapper, result, n);
/* clean array */
eina_array_clean(&ob->priv.onebuf_regions);
if (n == 0) return;
/* allocate rectangles */
- if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return;
+ if (!(result = alloca(n * sizeof(Eina_Rectangle)))) return;
/* loop the pending writes */
EINA_LIST_FREE(ob->priv.pending_writes, img)
/* based on rotation, set rectangle position */
if (ob->rotation == 0)
{
- rects[i].x = x;
- rects[i].y = y;
+ result[i].x = x;
+ result[i].y = y;
}
else if (ob->rotation == 90)
{
- rects[i].x = y;
- rects[i].y = (ob->w - x - w);
+ result[i].x = y;
+ result[i].y = (ob->w - x - w);
}
else if (ob->rotation == 180)
{
- rects[i].x = (ob->w - x - w);
- rects[i].y = (ob->h - y - h);
+ result[i].x = (ob->w - x - w);
+ result[i].y = (ob->h - y - h);
}
else if (ob->rotation == 270)
{
- rects[i].x = (ob->h - y - h);
- rects[i].y = x;
+ result[i].x = (ob->h - y - h);
+ result[i].y = x;
}
/* based on rotation, set rectangle size */
if ((ob->rotation == 0) || (ob->rotation == 180))
{
- rects[i].w = w;
- rects[i].h = h;
+ result[i].w = w;
+ result[i].h = h;
}
else if ((ob->rotation == 90) || (ob->rotation == 270))
{
- rects[i].w = h;
- rects[i].h = w;
+ result[i].w = h;
+ result[i].h = w;
}
eina_rectangle_free(rect);
evas_swapper_buffer_unmap(ob->priv.swapper);
/* force a buffer swap */
- evas_swapper_swap(ob->priv.swapper, rects, n);
+ evas_swapper_swap(ob->priv.swapper, result, n);
}
}
Outbuf *evas_swapbuf_setup(Evas_Engine_Info_Wayland_Shm *info, int w, int h, unsigned int rotation, Outbuf_Depth depth, Eina_Bool alpha, struct wl_shm *wl_shm, struct wl_surface *wl_surface);
void evas_swapbuf_free(Outbuf *ob);
void evas_swapbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rotation, Outbuf_Depth depth, Eina_Bool alpha);
-RGBA_Image *evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
+void *evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
void evas_swapbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
-void evas_swapbuf_flush(Outbuf *ob);
+void evas_swapbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
void evas_swapbuf_idle_flush(Outbuf *ob EINA_UNUSED);
Render_Engine_Swap_Mode evas_swapbuf_state_get(Outbuf *ob);
int evas_swapbuf_rotation_get(Outbuf *ob);