summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/buffer/evas_engine.c1
-rw-r--r--src/modules/evas/engines/drm/evas_engine.c3
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h4
-rw-r--r--src/modules/evas/engines/drm/evas_outbuf.c38
-rw-r--r--src/modules/evas/engines/fb/evas_engine.c1
-rw-r--r--src/modules/evas/engines/fb/evas_engine.h2
-rw-r--r--src/modules/evas/engines/fb/evas_outbuf.c2
-rw-r--r--src/modules/evas/engines/software_ddraw/evas_engine.h2
-rw-r--r--src/modules/evas/engines/software_ddraw/evas_outbuf.c4
-rw-r--r--src/modules/evas/engines/software_gdi/evas_engine.h2
-rw-r--r--src/modules/evas/engines/software_gdi/evas_outbuf.c4
-rw-r--r--src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h43
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c21
-rw-r--r--src/modules/evas/engines/software_x11/evas_engine.c5
-rw-r--r--src/modules/evas/engines/software_x11/evas_xcb_outbuf.c6
-rw-r--r--src/modules/evas/engines/software_x11/evas_xcb_outbuf.h4
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_outbuf.c8
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_outbuf.h20
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c46
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h20
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c3
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_swapbuf.c46
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_swapbuf.h4
23 files changed, 167 insertions, 122 deletions
diff --git a/src/modules/evas/engines/buffer/evas_engine.c b/src/modules/evas/engines/buffer/evas_engine.c
index 516e055f9b..1e47cb55db 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -107,6 +107,7 @@ _output_setup(int w,
107 evas_buffer_outbuf_buf_swap_mode_get, 107 evas_buffer_outbuf_buf_swap_mode_get,
108 evas_buffer_outbuf_buf_rot_get, 108 evas_buffer_outbuf_buf_rot_get,
109 evas_buffer_outbuf_reconfigure, 109 evas_buffer_outbuf_reconfigure,
110 NULL,
110 evas_buffer_outbuf_buf_new_region_for_update, 111 evas_buffer_outbuf_buf_new_region_for_update,
111 evas_buffer_outbuf_buf_push_updated_region, 112 evas_buffer_outbuf_buf_push_updated_region,
112 evas_buffer_outbuf_buf_free_region_for_update, 113 evas_buffer_outbuf_buf_free_region_for_update,
diff --git a/src/modules/evas/engines/drm/evas_engine.c b/src/modules/evas/engines/drm/evas_engine.c
index 68f586ae33..41dd8aba6b 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -38,6 +38,7 @@ _output_setup(Evas_Engine_Info_Drm *info, int w, int h)
38 evas_outbuf_buffer_state_get, 38 evas_outbuf_buffer_state_get,
39 evas_outbuf_get_rot, 39 evas_outbuf_get_rot,
40 evas_outbuf_reconfigure, 40 evas_outbuf_reconfigure,
41 NULL,
41 evas_outbuf_update_region_new, 42 evas_outbuf_update_region_new,
42 evas_outbuf_update_region_push, 43 evas_outbuf_update_region_push,
43 evas_outbuf_update_region_free, 44 evas_outbuf_update_region_free,
@@ -144,7 +145,7 @@ eng_setup(Evas *evas, void *einfo)
144 if (ob) return 0; 145 if (ob) return 0;
145 146
146 /* if we have an existing outbuf, free it */ 147 /* if we have an existing outbuf, free it */
147 evas_render_engine_software_generic_update(&re->generic, ob); 148 evas_render_engine_software_generic_update(&re->generic, ob, epd->output.w, epd->output.h);
148 } 149 }
149 150
150 /* update the info structure pointer */ 151 /* update the info structure pointer */
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index cf4e22206a..43d6febc88 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -123,10 +123,10 @@ void evas_outbuf_free(Outbuf *ob);
123void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); 123void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
124Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob); 124Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob);
125int evas_outbuf_get_rot(Outbuf *ob); 125int evas_outbuf_get_rot(Outbuf *ob);
126RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); 126void *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
127void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 127void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
128void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); 128void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
129void evas_outbuf_flush(Outbuf *ob); 129void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
130 130
131Eina_Bool evas_drm_init(Evas_Engine_Info_Drm *info); 131Eina_Bool evas_drm_init(Evas_Engine_Info_Drm *info);
132Eina_Bool evas_drm_shutdown(Evas_Engine_Info_Drm *info); 132Eina_Bool evas_drm_shutdown(Evas_Engine_Info_Drm *info);
diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c
index 1e33315626..6a2a4be631 100644
--- a/src/modules/evas/engines/drm/evas_outbuf.c
+++ b/src/modules/evas/engines/drm/evas_outbuf.c
@@ -226,7 +226,7 @@ evas_outbuf_buffer_state_get(Outbuf *ob)
226 return MODE_FULL; 226 return MODE_FULL;
227} 227}
228 228
229RGBA_Image * 229void *
230evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) 230evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
231{ 231{
232 RGBA_Image *img = NULL; 232 RGBA_Image *img = NULL;
@@ -411,19 +411,21 @@ evas_outbuf_update_region_free(Outbuf *ob EINA_UNUSED,
411 /* evas_cache_image_drop(&update->cache_entry); */ 411 /* evas_cache_image_drop(&update->cache_entry); */
412} 412}
413 413
414void 414void
415evas_outbuf_flush(Outbuf *ob) 415evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
416{ 416{
417 Eina_Rectangle *rects; 417 Eina_Rectangle *r;
418 RGBA_Image *img; 418 RGBA_Image *img;
419 unsigned int n = 0, i = 0; 419 unsigned int n = 0, i = 0;
420 420
421 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
422
421 /* get number of pending writes */ 423 /* get number of pending writes */
422 n = eina_list_count(ob->priv.pending_writes); 424 n = eina_list_count(ob->priv.pending_writes);
423 if (n == 0) return; 425 if (n == 0) return;
424 426
425 /* allocate rectangles */ 427 /* allocate rectangles */
426 if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return; 428 if (!(r = alloca(n * sizeof(Eina_Rectangle)))) return;
427 429
428 /* loop the pending writes */ 430 /* loop the pending writes */
429 EINA_LIST_FREE(ob->priv.pending_writes, img) 431 EINA_LIST_FREE(ob->priv.pending_writes, img)
@@ -438,35 +440,35 @@ evas_outbuf_flush(Outbuf *ob)
438 /* based on rotation, set rectangle position */ 440 /* based on rotation, set rectangle position */
439 if (ob->rotation == 0) 441 if (ob->rotation == 0)
440 { 442 {
441 rects[i].x = x; 443 r[i].x = x;
442 rects[i].y = y; 444 r[i].y = y;
443 } 445 }
444 else if (ob->rotation == 90) 446 else if (ob->rotation == 90)
445 { 447 {
446 rects[i].x = y; 448 r[i].x = y;
447 rects[i].y = (ob->w - x - w); 449 r[i].y = (ob->w - x - w);
448 } 450 }
449 else if (ob->rotation == 180) 451 else if (ob->rotation == 180)
450 { 452 {
451 rects[i].x = (ob->w - x - w); 453 r[i].x = (ob->w - x - w);
452 rects[i].y = (ob->h - y - h); 454 r[i].y = (ob->h - y - h);
453 } 455 }
454 else if (ob->rotation == 270) 456 else if (ob->rotation == 270)
455 { 457 {
456 rects[i].x = (ob->h - y - h); 458 r[i].x = (ob->h - y - h);
457 rects[i].y = x; 459 r[i].y = x;
458 } 460 }
459 461
460 /* based on rotation, set rectangle size */ 462 /* based on rotation, set rectangle size */
461 if ((ob->rotation == 0) || (ob->rotation == 180)) 463 if ((ob->rotation == 0) || (ob->rotation == 180))
462 { 464 {
463 rects[i].w = w; 465 r[i].w = w;
464 rects[i].h = h; 466 r[i].h = h;
465 } 467 }
466 else if ((ob->rotation == 90) || (ob->rotation == 270)) 468 else if ((ob->rotation == 90) || (ob->rotation == 270))
467 { 469 {
468 rects[i].w = h; 470 r[i].w = h;
469 rects[i].h = w; 471 r[i].h = w;
470 } 472 }
471 473
472 eina_rectangle_free(rect); 474 eina_rectangle_free(rect);
@@ -482,7 +484,7 @@ evas_outbuf_flush(Outbuf *ob)
482 } 484 }
483 485
484 /* force a buffer swap */ 486 /* force a buffer swap */
485 _evas_outbuf_buffer_swap(ob, rects, n); 487 _evas_outbuf_buffer_swap(ob, r, n);
486} 488}
487 489
488int 490int
diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c
index 215bee4582..3a02a69345 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -57,6 +57,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh)
57 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL, 57 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
58 evas_fb_outbuf_fb_get_rot, 58 evas_fb_outbuf_fb_get_rot,
59 evas_fb_outbuf_fb_reconfigure, 59 evas_fb_outbuf_fb_reconfigure,
60 NULL,
60 evas_fb_outbuf_fb_new_region_for_update, 61 evas_fb_outbuf_fb_new_region_for_update,
61 evas_fb_outbuf_fb_push_updated_region, 62 evas_fb_outbuf_fb_push_updated_region,
62 evas_fb_outbuf_fb_free_region_for_update, 63 evas_fb_outbuf_fb_free_region_for_update,
diff --git a/src/modules/evas/engines/fb/evas_engine.h b/src/modules/evas/engines/fb/evas_engine.h
index d4fcb3ef27..424d47cbbe 100644
--- a/src/modules/evas/engines/fb/evas_engine.h
+++ b/src/modules/evas/engines/fb/evas_engine.h
@@ -57,7 +57,7 @@ Outbuf *evas_fb_outbuf_fb_setup_fb (int w, int h, int rot, Ou
57 57
58void evas_fb_outbuf_fb_blit (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y); 58void evas_fb_outbuf_fb_blit (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
59void evas_fb_outbuf_fb_update (Outbuf *buf, int x, int y, int w, int h); 59void evas_fb_outbuf_fb_update (Outbuf *buf, int x, int y, int w, int h);
60RGBA_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); 60void *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);
61void evas_fb_outbuf_fb_free_region_for_update (Outbuf *buf, RGBA_Image *update); 61void evas_fb_outbuf_fb_free_region_for_update (Outbuf *buf, RGBA_Image *update);
62void evas_fb_outbuf_fb_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); 62void evas_fb_outbuf_fb_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
63void evas_fb_outbuf_fb_reconfigure (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth); 63void evas_fb_outbuf_fb_reconfigure (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
diff --git a/src/modules/evas/engines/fb/evas_outbuf.c b/src/modules/evas/engines/fb/evas_outbuf.c
index 5196507084..0c22cf5712 100644
--- a/src/modules/evas/engines/fb/evas_outbuf.c
+++ b/src/modules/evas/engines/fb/evas_outbuf.c
@@ -240,7 +240,7 @@ evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h)
240 } 240 }
241} 241}
242 242
243RGBA_Image * 243void *
244evas_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) 244evas_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)
245{ 245{
246 if (buf->priv.back_buf) 246 if (buf->priv.back_buf)
diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.h b/src/modules/evas/engines/software_ddraw/evas_engine.h
index 084a50d4e7..9217cdcfa5 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.h
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.h
@@ -140,7 +140,7 @@ void evas_software_ddraw_outbuf_push_updated_region(Outbuf *buf,
140void evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf, 140void evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf,
141 RGBA_Image *update); 141 RGBA_Image *update);
142 142
143void evas_software_ddraw_outbuf_flush(Outbuf *buf); 143void evas_software_ddraw_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode);
144 144
145void evas_software_ddraw_outbuf_idle_flush(Outbuf *buf); 145void evas_software_ddraw_outbuf_idle_flush(Outbuf *buf);
146 146
diff --git a/src/modules/evas/engines/software_ddraw/evas_outbuf.c b/src/modules/evas/engines/software_ddraw/evas_outbuf.c
index 0e121ac981..4d6a515c64 100644
--- a/src/modules/evas/engines/software_ddraw/evas_outbuf.c
+++ b/src/modules/evas/engines/software_ddraw/evas_outbuf.c
@@ -356,7 +356,7 @@ evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf EINA_UNUSED,
356} 356}
357 357
358void 358void
359evas_software_ddraw_outbuf_flush(Outbuf *buf) 359evas_software_ddraw_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode)
360{ 360{
361 Eina_List *l; 361 Eina_List *l;
362 RGBA_Image *im; 362 RGBA_Image *im;
@@ -367,6 +367,8 @@ evas_software_ddraw_outbuf_flush(Outbuf *buf)
367 int ddraw_pitch; 367 int ddraw_pitch;
368 int ddraw_depth; 368 int ddraw_depth;
369 369
370 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
371
370 /* lock the back surface */ 372 /* lock the back surface */
371 if (!(ddraw_data = evas_software_ddraw_lock(buf, 373 if (!(ddraw_data = evas_software_ddraw_lock(buf,
372 &ddraw_width, 374 &ddraw_width,
diff --git a/src/modules/evas/engines/software_gdi/evas_engine.h b/src/modules/evas/engines/software_gdi/evas_engine.h
index 86f27e6199..a69032c15f 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.h
+++ b/src/modules/evas/engines/software_gdi/evas_engine.h
@@ -184,7 +184,7 @@ void evas_software_gdi_outbuf_push_updated_region(Outbuf *buf,
184void evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf, 184void evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf,
185 RGBA_Image *update); 185 RGBA_Image *update);
186 186
187void evas_software_gdi_outbuf_flush(Outbuf *buf); 187void evas_software_gdi_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode);
188 188
189void evas_software_gdi_outbuf_idle_flush(Outbuf *buf); 189void evas_software_gdi_outbuf_idle_flush(Outbuf *buf);
190 190
diff --git a/src/modules/evas/engines/software_gdi/evas_outbuf.c b/src/modules/evas/engines/software_gdi/evas_outbuf.c
index 28a64a37d8..705c56961f 100644
--- a/src/modules/evas/engines/software_gdi/evas_outbuf.c
+++ b/src/modules/evas/engines/software_gdi/evas_outbuf.c
@@ -563,12 +563,14 @@ evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf EINA_UNUSED,
563} 563}
564 564
565void 565void
566evas_software_gdi_outbuf_flush(Outbuf *buf) 566evas_software_gdi_outbuf_flush(Outbuf *buf, Evas_Render_Mode render_mode)
567{ 567{
568 Eina_List *l; 568 Eina_List *l;
569 RGBA_Image *im; 569 RGBA_Image *im;
570 Outbuf_Region *obr; 570 Outbuf_Region *obr;
571 571
572 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
573
572 /* copy safely the images that need to be drawn onto the back surface */ 574 /* copy safely the images that need to be drawn onto the back surface */
573 EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) 575 EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
574 { 576 {
diff --git a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index 8ab8101b22..dc9b971d49 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -28,7 +28,8 @@ typedef enum {
28 MODE_COPY, 28 MODE_COPY,
29 MODE_DOUBLE, 29 MODE_DOUBLE,
30 MODE_TRIPLE, 30 MODE_TRIPLE,
31 MODE_QUADRUPLE 31 MODE_QUADRUPLE,
32 MODE_AUTO
32} Render_Engine_Swap_Mode; 33} Render_Engine_Swap_Mode;
33 34
34typedef enum { 35typedef enum {
@@ -41,13 +42,14 @@ typedef struct _Outbuf Outbuf;
41 42
42typedef Render_Engine_Swap_Mode (*Outbuf_Swap_Mode_Get)(Outbuf *ob); 43typedef Render_Engine_Swap_Mode (*Outbuf_Swap_Mode_Get)(Outbuf *ob);
43typedef void (*Outbuf_Reconfigure)(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); 44typedef void (*Outbuf_Reconfigure)(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
44typedef 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); 45typedef Eina_Bool (*Outbuf_Region_First_Rect)(Outbuf *ob);
46typedef void *(*Outbuf_New_Region_For_Update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
45typedef void (*Outbuf_Push_Updated_Region)(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 47typedef void (*Outbuf_Push_Updated_Region)(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
46typedef void (*Outbuf_Idle_Flush)(Outbuf *ob); 48typedef void (*Outbuf_Idle_Flush)(Outbuf *ob);
47typedef void (*Outbuf_Free_Region_For_Update)(Outbuf *ob, RGBA_Image *update); 49typedef void (*Outbuf_Free_Region_For_Update)(Outbuf *ob, RGBA_Image *update);
48typedef void (*Outbuf_Free)(Outbuf *ob); 50typedef void (*Outbuf_Free)(Outbuf *ob);
49typedef int (*Outbuf_Get_Rot)(Outbuf *ob); 51typedef int (*Outbuf_Get_Rot)(Outbuf *ob);
50typedef void (*Outbuf_Flush)(Outbuf *ob); 52typedef void (*Outbuf_Flush)(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
51 53
52struct _Render_Engine_Software_Generic 54struct _Render_Engine_Software_Generic
53{ 55{
@@ -60,6 +62,7 @@ struct _Render_Engine_Software_Generic
60 Outbuf_Swap_Mode_Get outbuf_swap_mode_get; 62 Outbuf_Swap_Mode_Get outbuf_swap_mode_get;
61 Outbuf_Get_Rot outbuf_get_rot; 63 Outbuf_Get_Rot outbuf_get_rot;
62 Outbuf_Reconfigure outbuf_reconfigure; 64 Outbuf_Reconfigure outbuf_reconfigure;
65 Outbuf_Region_First_Rect outbuf_region_first_rect;
63 Outbuf_New_Region_For_Update outbuf_new_region_for_update; 66 Outbuf_New_Region_For_Update outbuf_new_region_for_update;
64 Outbuf_Push_Updated_Region outbuf_push_updated_region; 67 Outbuf_Push_Updated_Region outbuf_push_updated_region;
65 Outbuf_Idle_Flush outbuf_idle_flush; 68 Outbuf_Idle_Flush outbuf_idle_flush;
@@ -74,6 +77,7 @@ struct _Render_Engine_Software_Generic
74 77
75 unsigned char end : 1; 78 unsigned char end : 1;
76 unsigned char lost_back : 1; 79 unsigned char lost_back : 1;
80 unsigned char tile_strict : 1;
77}; 81};
78 82
79static inline Eina_Bool 83static inline Eina_Bool
@@ -82,6 +86,7 @@ evas_render_engine_software_generic_init(Render_Engine_Software_Generic *re,
82 Outbuf_Swap_Mode_Get outbuf_swap_mode_get, 86 Outbuf_Swap_Mode_Get outbuf_swap_mode_get,
83 Outbuf_Get_Rot outbuf_get_rot, 87 Outbuf_Get_Rot outbuf_get_rot,
84 Outbuf_Reconfigure outbuf_reconfigure, 88 Outbuf_Reconfigure outbuf_reconfigure,
89 Outbuf_Region_First_Rect outbuf_region_first_rect,
85 Outbuf_New_Region_For_Update outbuf_new_region_for_update, 90 Outbuf_New_Region_For_Update outbuf_new_region_for_update,
86 Outbuf_Push_Updated_Region outbuf_push_updated_region, 91 Outbuf_Push_Updated_Region outbuf_push_updated_region,
87 Outbuf_Free_Region_For_Update outbuf_free_region_for_update, 92 Outbuf_Free_Region_For_Update outbuf_free_region_for_update,
@@ -96,6 +101,7 @@ evas_render_engine_software_generic_init(Render_Engine_Software_Generic *re,
96 re->outbuf_swap_mode_get = outbuf_swap_mode_get; 101 re->outbuf_swap_mode_get = outbuf_swap_mode_get;
97 re->outbuf_get_rot = outbuf_get_rot; 102 re->outbuf_get_rot = outbuf_get_rot;
98 re->outbuf_reconfigure = outbuf_reconfigure; 103 re->outbuf_reconfigure = outbuf_reconfigure;
104 re->outbuf_region_first_rect = outbuf_region_first_rect;
99 re->outbuf_new_region_for_update = outbuf_new_region_for_update; 105 re->outbuf_new_region_for_update = outbuf_new_region_for_update;
100 re->outbuf_push_updated_region = outbuf_push_updated_region; 106 re->outbuf_push_updated_region = outbuf_push_updated_region;
101 re->outbuf_idle_flush = outbuf_idle_flush; 107 re->outbuf_idle_flush = outbuf_idle_flush;
@@ -114,6 +120,7 @@ evas_render_engine_software_generic_init(Render_Engine_Software_Generic *re,
114 re->merge_mode = MERGE_FULL; 120 re->merge_mode = MERGE_FULL;
115 re->end = 0; 121 re->end = 0;
116 re->lost_back = 0; 122 re->lost_back = 0;
123 re->tile_strict = 0;
117 124
118 re->tb = evas_common_tilebuf_new(w, h); 125 re->tb = evas_common_tilebuf_new(w, h);
119 if (!re->tb) return EINA_FALSE; 126 if (!re->tb) return EINA_FALSE;
@@ -140,18 +147,34 @@ evas_render_engine_software_generic_clean(Render_Engine_Software_Generic *re)
140} 147}
141 148
142static inline void 149static inline void
143evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re, 150evas_render_engine_software_generic_merge_mode_set(Render_Engine_Software_Generic *re,
144 Outbuf *ob) 151 Render_Engine_Merge_Mode merge_mode)
145{ 152{
146 if (re->ob) re->outbuf_free(re->ob); 153 re->merge_mode = merge_mode;
147 re->ob = ob;
148} 154}
149 155
150static inline void 156static inline void
151evas_render_engine_software_generic_merge_mode_set(Render_Engine_Software_Generic *re, 157evas_render_engine_software_generic_tile_strict_set(Render_Engine_Software_Generic *re,
152 Render_Engine_Merge_Mode merge_mode) 158 Eina_Bool tile_strict)
153{ 159{
154 re->merge_mode = merge_mode; 160 re->tile_strict = !!tile_strict;
161 evas_common_tilebuf_tile_strict_set(re->tb, re->tile_strict);
162}
163
164static inline Eina_Bool
165evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
166 Outbuf *ob,
167 int w, int h)
168{
169 if (re->ob) re->outbuf_free(re->ob);
170 re->ob = ob;
171
172 evas_common_tilebuf_free(re->tb);
173 re->tb = evas_common_tilebuf_new(w, h);
174 if (!re->tb) return EINA_FALSE;
175 evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
176 evas_render_engine_software_generic_tile_strict_set(re, re->tile_strict);
177 return EINA_TRUE;
155} 178}
156 179
157#endif 180#endif
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 274d421e8d..7c57fcfdd0 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -2586,6 +2586,7 @@ eng_output_resize(void *data, int w, int h)
2586 re->tb = evas_common_tilebuf_new(w, h); 2586 re->tb = evas_common_tilebuf_new(w, h);
2587 if (re->tb) 2587 if (re->tb)
2588 evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); 2588 evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
2589 evas_common_tilebuf_tile_strict_set(re->tb, re->tile_strict);
2589 re->w = w; 2590 re->w = w;
2590 re->h = h; 2591 re->h = h;
2591} 2592}
@@ -2703,9 +2704,8 @@ static void *
2703eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) 2704eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch)
2704{ 2705{
2705 Render_Engine_Software_Generic *re; 2706 Render_Engine_Software_Generic *re;
2706 RGBA_Image *surface; 2707 void *surface;
2707 Tilebuf_Rect *rect; 2708 Tilebuf_Rect *rect;
2708 Eina_Bool first_rect = EINA_FALSE;
2709 2709
2710#define CLEAR_PREV_RECTS(x) \ 2710#define CLEAR_PREV_RECTS(x) \
2711 do { \ 2711 do { \
@@ -2728,9 +2728,13 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
2728 re->rects = evas_common_tilebuf_get_render_rects(re->tb); 2728 re->rects = evas_common_tilebuf_get_render_rects(re->tb);
2729 if (re->rects) 2729 if (re->rects)
2730 { 2730 {
2731 // do anything needed for the first rect and update lost backbuffer if needed
2732 if (re->outbuf_region_first_rect)
2733 re->lost_back |= re->outbuf_region_first_rect(re->ob);
2734
2731 if (re->outbuf_swap_mode_get) mode = re->outbuf_swap_mode_get(re->ob); 2735 if (re->outbuf_swap_mode_get) mode = re->outbuf_swap_mode_get(re->ob);
2732 re->swap_mode = mode; 2736 re->swap_mode = mode;
2733 if ((re->lost_back) || (re->swap_mode == MODE_FULL)) 2737 if ((re->lost_back) || (re->swap_mode == MODE_FULL) || (re->swap_mode == MODE_AUTO))
2734 { 2738 {
2735 /* if we lost our backbuffer since the last frame redraw all */ 2739 /* if we lost our backbuffer since the last frame redraw all */
2736 re->lost_back = 0; 2740 re->lost_back = 0;
@@ -2749,6 +2753,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
2749 re->rects = NULL; 2753 re->rects = NULL;
2750 switch (re->swap_mode) 2754 switch (re->swap_mode)
2751 { 2755 {
2756 case MODE_AUTO:
2752 case MODE_FULL: 2757 case MODE_FULL:
2753 case MODE_COPY: // no prev rects needed 2758 case MODE_COPY: // no prev rects needed
2754 re->rects = _merge_rects(re->merge_mode, re->tb, re->rects_prev[0], NULL, NULL, NULL); 2759 re->rects = _merge_rects(re->merge_mode, re->tb, re->rects_prev[0], NULL, NULL, NULL);
@@ -2765,7 +2770,6 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
2765 default: 2770 default:
2766 break; 2771 break;
2767 } 2772 }
2768 first_rect = EINA_TRUE;
2769 } 2773 }
2770 evas_common_tilebuf_clear(re->tb); 2774 evas_common_tilebuf_clear(re->tb);
2771 re->cur_rect = EINA_INLIST_GET(re->rects); 2775 re->cur_rect = EINA_INLIST_GET(re->rects);
@@ -2791,6 +2795,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
2791 *ch = rect->h; 2795 *ch = rect->h;
2792 re->cur_rect = re->cur_rect->next; 2796 re->cur_rect = re->cur_rect->next;
2793 break; 2797 break;
2798 case MODE_AUTO:
2794 case MODE_FULL: 2799 case MODE_FULL:
2795 re->cur_rect = NULL; 2800 re->cur_rect = NULL;
2796 if (x) *x = 0; 2801 if (x) *x = 0;
@@ -2805,10 +2810,6 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
2805 default: 2810 default:
2806 break; 2811 break;
2807 } 2812 }
2808 if (first_rect)
2809 {
2810 // do anything needed fir the first frame
2811 }
2812 surface = re->outbuf_new_region_for_update(re->ob, 2813 surface = re->outbuf_new_region_for_update(re->ob,
2813 *x, *y, *w, *h, 2814 *x, *y, *w, *h,
2814 cx, cy, cw, ch); 2815 cx, cy, cw, ch);
@@ -2845,8 +2846,8 @@ eng_output_flush(void *data, Evas_Render_Mode render_mode)
2845 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return; 2846 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
2846 2847
2847 re = (Render_Engine_Software_Generic *)data; 2848 re = (Render_Engine_Software_Generic *)data;
2848 if (re->outbuf_flush) re->outbuf_flush(re->ob); 2849 if (re->outbuf_flush) re->outbuf_flush(re->ob, re->rects, render_mode);
2849 if (re->rects) 2850 if (re->rects && render_mode != EVAS_RENDER_MODE_ASYNC_INIT)
2850 { 2851 {
2851 evas_common_tilebuf_free_render_rects(re->rects); 2852 evas_common_tilebuf_free_render_rects(re->rects);
2852 re->rects = NULL; 2853 re->rects = NULL;
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c
index 80036d8e9f..2d7e9bfb61 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -163,6 +163,7 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw,
163 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL, 163 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
164 evas_software_xlib_outbuf_get_rot, 164 evas_software_xlib_outbuf_get_rot,
165 evas_software_xlib_outbuf_reconfigure, 165 evas_software_xlib_outbuf_reconfigure,
166 NULL,
166 evas_software_xlib_outbuf_new_region_for_update, 167 evas_software_xlib_outbuf_new_region_for_update,
167 evas_software_xlib_outbuf_push_updated_region, 168 evas_software_xlib_outbuf_push_updated_region,
168 evas_software_xlib_outbuf_free_region_for_update, 169 evas_software_xlib_outbuf_free_region_for_update,
@@ -207,6 +208,7 @@ _output_swapbuf_setup(int w, int h, int rot, Display *disp, Drawable draw,
207 evas_software_xlib_swapbuf_buffer_state_get, 208 evas_software_xlib_swapbuf_buffer_state_get,
208 evas_software_xlib_swapbuf_get_rot, 209 evas_software_xlib_swapbuf_get_rot,
209 evas_software_xlib_swapbuf_reconfigure, 210 evas_software_xlib_swapbuf_reconfigure,
211 NULL,
210 evas_software_xlib_swapbuf_new_region_for_update, 212 evas_software_xlib_swapbuf_new_region_for_update,
211 evas_software_xlib_swapbuf_push_updated_region, 213 evas_software_xlib_swapbuf_push_updated_region,
212 evas_software_xlib_swapbuf_free_region_for_update, 214 evas_software_xlib_swapbuf_free_region_for_update,
@@ -262,6 +264,7 @@ _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn,
262 if (!evas_render_engine_software_generic_init(re, ob, NULL, 264 if (!evas_render_engine_software_generic_init(re, ob, NULL,
263 evas_software_xcb_outbuf_rotation_get, 265 evas_software_xcb_outbuf_rotation_get,
264 evas_software_xcb_outbuf_reconfigure, 266 evas_software_xcb_outbuf_reconfigure,
267 NULL,
265 evas_software_xcb_outbuf_new_region_for_update, 268 evas_software_xcb_outbuf_new_region_for_update,
266 evas_software_xcb_outbuf_push_updated_region, 269 evas_software_xcb_outbuf_push_updated_region,
267 evas_software_xcb_outbuf_free_region_for_update, 270 evas_software_xcb_outbuf_free_region_for_update,
@@ -568,7 +571,7 @@ eng_setup(Evas *eo_e, void *in)
568 571
569 if (ob) 572 if (ob)
570 { 573 {
571 evas_render_engine_software_generic_update(&re->generic, ob); 574 evas_render_engine_software_generic_update(&re->generic, ob, e->output.w, e->output.h);
572 } 575 }
573 576
574 /* if ((re) && (re->ob)) re->ob->onebuf = ponebuf; */ 577 /* if ((re) && (re->ob)) re->ob->onebuf = ponebuf; */
diff --git a/src/modules/evas/engines/software_x11/evas_xcb_outbuf.c b/src/modules/evas/engines/software_x11/evas_xcb_outbuf.c
index ba544efcb4..048e7edd8e 100644
--- a/src/modules/evas/engines/software_x11/evas_xcb_outbuf.c
+++ b/src/modules/evas/engines/software_x11/evas_xcb_outbuf.c
@@ -259,7 +259,7 @@ evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_co
259 return buf; 259 return buf;
260} 260}
261 261
262RGBA_Image * 262void *
263evas_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) 263evas_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)
264{ 264{
265 RGBA_Image *im = NULL; 265 RGBA_Image *im = NULL;
@@ -581,12 +581,14 @@ evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf EINA_UNUSED, RGBA_Im
581} 581}
582 582
583void 583void
584evas_software_xcb_outbuf_flush(Outbuf *buf) 584evas_software_xcb_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode)
585{ 585{
586 Eina_List *l = NULL; 586 Eina_List *l = NULL;
587 RGBA_Image *im = NULL; 587 RGBA_Image *im = NULL;
588 Outbuf_Region *obr = NULL; 588 Outbuf_Region *obr = NULL;
589 589
590 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
591
590 if ((buf->priv.onebuf) && (eina_array_count(&buf->priv.onebuf_regions))) 592 if ((buf->priv.onebuf) && (eina_array_count(&buf->priv.onebuf_regions)))
591 { 593 {
592 Eina_Array_Iterator it; 594 Eina_Array_Iterator it;
diff --git a/src/modules/evas/engines/software_x11/evas_xcb_outbuf.h b/src/modules/evas/engines/software_x11/evas_xcb_outbuf.h
index e9f300180b..39ac6dcd84 100644
--- a/src/modules/evas/engines/software_x11/evas_xcb_outbuf.h
+++ b/src/modules/evas/engines/software_x11/evas_xcb_outbuf.h
@@ -6,9 +6,9 @@
6void evas_software_xcb_outbuf_init(void); 6void evas_software_xcb_outbuf_init(void);
7void evas_software_xcb_outbuf_free(Outbuf *buf); 7void evas_software_xcb_outbuf_free(Outbuf *buf);
8Outbuf *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); 8Outbuf *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);
9RGBA_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); 9void *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);
10void evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf, RGBA_Image *update); 10void evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf, RGBA_Image *update);
11void evas_software_xcb_outbuf_flush(Outbuf *buf); 11void evas_software_xcb_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
12void evas_software_xcb_outbuf_idle_flush(Outbuf *buf); 12void evas_software_xcb_outbuf_idle_flush(Outbuf *buf);
13void evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); 13void evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
14void evas_software_xcb_outbuf_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth); 14void evas_software_xcb_outbuf_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
index a189accc27..8fd2f1079c 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
@@ -172,7 +172,7 @@ evas_software_xlib_outbuf_free(Outbuf *buf)
172 free(obr); 172 free(obr);
173 } 173 }
174 evas_software_xlib_outbuf_idle_flush(buf); 174 evas_software_xlib_outbuf_idle_flush(buf);
175 evas_software_xlib_outbuf_flush(buf); 175 evas_software_xlib_outbuf_flush(buf, NULL, MODE_FULL);
176 if (buf->priv.x11.xlib.gc) 176 if (buf->priv.x11.xlib.gc)
177 XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc); 177 XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc);
178 if (buf->priv.x11.xlib.gcm) 178 if (buf->priv.x11.xlib.gcm)
@@ -361,7 +361,7 @@ evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
361 return buf; 361 return buf;
362} 362}
363 363
364RGBA_Image * 364void *
365evas_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) 365evas_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)
366{ 366{
367 RGBA_Image *im; 367 RGBA_Image *im;
@@ -710,12 +710,14 @@ evas_software_xlib_outbuf_free_region_for_update(Outbuf *buf EINA_UNUSED, RGBA_I
710} 710}
711 711
712void 712void
713evas_software_xlib_outbuf_flush(Outbuf *buf) 713evas_software_xlib_outbuf_flush(Outbuf *buf, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
714{ 714{
715 Eina_List *l; 715 Eina_List *l;
716 RGBA_Image *im; 716 RGBA_Image *im;
717 Outbuf_Region *obr; 717 Outbuf_Region *obr;
718 718
719 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
720
719 if ((buf->priv.onebuf) && eina_array_count(&buf->priv.onebuf_regions)) 721 if ((buf->priv.onebuf) && eina_array_count(&buf->priv.onebuf_regions))
720 { 722 {
721 Eina_Rectangle *rect; 723 Eina_Rectangle *rect;
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.h b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.h
index 8745a1abfd..16f0cf1b53 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.h
+++ b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.h
@@ -25,20 +25,20 @@ Outbuf *evas_software_xlib_outbuf_setup_x (int w,
25 int destination_alpha); 25 int destination_alpha);
26 26
27 27
28RGBA_Image *evas_software_xlib_outbuf_new_region_for_update (Outbuf *buf, 28void *evas_software_xlib_outbuf_new_region_for_update (Outbuf *buf,
29 int x, 29 int x,
30 int y, 30 int y,
31 int w, 31 int w,
32 int h, 32 int h,
33 int *cx, 33 int *cx,
34 int *cy, 34 int *cy,
35 int *cw, 35 int *cw,
36 int *ch); 36 int *ch);
37 37
38void evas_software_xlib_outbuf_free_region_for_update (Outbuf *buf, 38void evas_software_xlib_outbuf_free_region_for_update (Outbuf *buf,
39 RGBA_Image *update); 39 RGBA_Image *update);
40 40
41void evas_software_xlib_outbuf_flush (Outbuf *buf); 41void evas_software_xlib_outbuf_flush (Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
42 42
43void evas_software_xlib_outbuf_idle_flush (Outbuf *buf); 43void evas_software_xlib_outbuf_idle_flush (Outbuf *buf);
44 44
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c
index ddd128b9ca..59a83d81ec 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c
@@ -34,7 +34,7 @@ evas_software_xlib_swapbuf_init(void)
34void 34void
35evas_software_xlib_swapbuf_free(Outbuf *buf) 35evas_software_xlib_swapbuf_free(Outbuf *buf)
36{ 36{
37 evas_software_xlib_swapbuf_flush(buf); 37 evas_software_xlib_swapbuf_flush(buf, NULL, MODE_FULL);
38 evas_software_xlib_swapbuf_idle_flush(buf); 38 evas_software_xlib_swapbuf_idle_flush(buf);
39 if (buf->priv.pal) 39 if (buf->priv.pal)
40 evas_software_xlib_x_color_deallocate 40 evas_software_xlib_x_color_deallocate
@@ -207,7 +207,7 @@ evas_software_xlib_swapbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
207 return buf; 207 return buf;
208} 208}
209 209
210RGBA_Image * 210void *
211evas_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) 211evas_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)
212{ 212{
213 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h); 213 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h);
@@ -315,25 +315,27 @@ evas_software_xlib_swapbuf_free_region_for_update(Outbuf *buf EINA_UNUSED, RGBA_
315} 315}
316 316
317void 317void
318evas_software_xlib_swapbuf_flush(Outbuf *buf) 318evas_software_xlib_swapbuf_flush(Outbuf *buf, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode EINA_UNUSED)
319{ 319{
320 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
321
320 if (!buf->priv.pending_writes) 322 if (!buf->priv.pending_writes)
321 { 323 {
322 Eina_Rectangle *rects, *rect; 324 Eina_Rectangle *result, *rect;
323 Eina_Array_Iterator it; 325 Eina_Array_Iterator it;
324 unsigned int n, i; 326 unsigned int n, i;
325 RGBA_Image *im; 327 RGBA_Image *im;
326 328
327 n = eina_array_count_get(&buf->priv.onebuf_regions); 329 n = eina_array_count_get(&buf->priv.onebuf_regions);
328 if (n == 0) return; 330 if (n == 0) return;
329 rects = alloca(n * sizeof(Eina_Rectangle)); 331 result = alloca(n * sizeof(Eina_Rectangle));
330 EINA_ARRAY_ITER_NEXT(&buf->priv.onebuf_regions, i, rect, it) 332 EINA_ARRAY_ITER_NEXT(&buf->priv.onebuf_regions, i, rect, it)
331 { 333 {
332 rects[i] = *rect; 334 result[i] = *rect;
333 eina_rectangle_free(rect); 335 eina_rectangle_free(rect);
334 } 336 }
335 evas_xlib_swapper_buffer_unmap(buf->priv.swapper); 337 evas_xlib_swapper_buffer_unmap(buf->priv.swapper);
336 evas_xlib_swapper_swap(buf->priv.swapper, rects, n); 338 evas_xlib_swapper_swap(buf->priv.swapper, result, n);
337 eina_array_clean(&buf->priv.onebuf_regions); 339 eina_array_clean(&buf->priv.onebuf_regions);
338 im = buf->priv.onebuf; 340 im = buf->priv.onebuf;
339 buf->priv.onebuf = NULL; 341 buf->priv.onebuf = NULL;
@@ -350,12 +352,12 @@ evas_software_xlib_swapbuf_flush(Outbuf *buf)
350 else 352 else
351 { 353 {
352 RGBA_Image *im; 354 RGBA_Image *im;
353 Eina_Rectangle *rects; 355 Eina_Rectangle *result;
354 unsigned int n, i = 0; 356 unsigned int n, i = 0;
355 357
356 n = eina_list_count(buf->priv.pending_writes); 358 n = eina_list_count(buf->priv.pending_writes);
357 if (n == 0) return; 359 if (n == 0) return;
358 rects = alloca(n * sizeof(Eina_Rectangle)); 360 result = alloca(n * sizeof(Eina_Rectangle));
359 EINA_LIST_FREE(buf->priv.pending_writes, im) 361 EINA_LIST_FREE(buf->priv.pending_writes, im)
360 { 362 {
361 Eina_Rectangle *rect = im->extended_info; 363 Eina_Rectangle *rect = im->extended_info;
@@ -364,33 +366,33 @@ evas_software_xlib_swapbuf_flush(Outbuf *buf)
364 x = rect->x; y = rect->y; w = rect->w; h = rect->h; 366 x = rect->x; y = rect->y; w = rect->w; h = rect->h;
365 if (buf->rot == 0) 367 if (buf->rot == 0)
366 { 368 {
367 rects[i].x = x; 369 result[i].x = x;
368 rects[i].y = y; 370 result[i].y = y;
369 } 371 }
370 else if (buf->rot == 90) 372 else if (buf->rot == 90)
371 { 373 {
372 rects[i].x = y; 374 result[i].x = y;
373 rects[i].y = buf->w - x - w; 375 result[i].y = buf->w - x - w;
374 } 376 }
375 else if (buf->rot == 180) 377 else if (buf->rot == 180)
376 { 378 {
377 rects[i].x = buf->w - x - w; 379 result[i].x = buf->w - x - w;
378 rects[i].y = buf->h - y - h; 380 result[i].y = buf->h - y - h;
379 } 381 }
380 else if (buf->rot == 270) 382 else if (buf->rot == 270)
381 { 383 {
382 rects[i].x = buf->h - y - h; 384 result[i].x = buf->h - y - h;
383 rects[i].y = x; 385 result[i].y = x;
384 } 386 }
385 if ((buf->rot == 0) || (buf->rot == 180)) 387 if ((buf->rot == 0) || (buf->rot == 180))
386 { 388 {
387 rects[i].w = w; 389 result[i].w = w;
388 rects[i].h = h; 390 result[i].h = h;
389 } 391 }
390 else if ((buf->rot == 90) || (buf->rot == 270)) 392 else if ((buf->rot == 90) || (buf->rot == 270))
391 { 393 {
392 rects[i].w = h; 394 result[i].w = h;
393 rects[i].h = w; 395 result[i].h = w;
394 } 396 }
395 eina_rectangle_free(rect); 397 eina_rectangle_free(rect);
396#ifdef EVAS_CSERVE2 398#ifdef EVAS_CSERVE2
@@ -402,7 +404,7 @@ evas_software_xlib_swapbuf_flush(Outbuf *buf)
402 i++; 404 i++;
403 } 405 }
404 evas_xlib_swapper_buffer_unmap(buf->priv.swapper); 406 evas_xlib_swapper_buffer_unmap(buf->priv.swapper);
405 evas_xlib_swapper_swap(buf->priv.swapper, rects, n); 407 evas_xlib_swapper_swap(buf->priv.swapper, result, n);
406// evas_xlib_swapper_swap(buf->priv.swapper, NULL, 0); 408// evas_xlib_swapper_swap(buf->priv.swapper, NULL, 0);
407 } 409 }
408} 410}
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h
index ac8011697a..031c29de1f 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h
+++ b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h
@@ -21,18 +21,18 @@ Outbuf *evas_software_xlib_swapbuf_setup_x(int w,
21 Pixmap mask, 21 Pixmap mask,
22 int shape_dither, 22 int shape_dither,
23 int destination_alpha); 23 int destination_alpha);
24RGBA_Image *evas_software_xlib_swapbuf_new_region_for_update(Outbuf *buf, 24void *evas_software_xlib_swapbuf_new_region_for_update(Outbuf *buf,
25 int x, 25 int x,
26 int y, 26 int y,
27 int w, 27 int w,
28 int h, 28 int h,
29 int *cx, 29 int *cx,
30 int *cy, 30 int *cy,
31 int *cw, 31 int *cw,
32 int *ch); 32 int *ch);
33void evas_software_xlib_swapbuf_free_region_for_update(Outbuf *buf, 33void evas_software_xlib_swapbuf_free_region_for_update(Outbuf *buf,
34 RGBA_Image *update); 34 RGBA_Image *update);
35void evas_software_xlib_swapbuf_flush(Outbuf *buf); 35void evas_software_xlib_swapbuf_flush(Outbuf *buf, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
36void evas_software_xlib_swapbuf_idle_flush(Outbuf *buf); 36void evas_software_xlib_swapbuf_idle_flush(Outbuf *buf);
37void evas_software_xlib_swapbuf_push_updated_region(Outbuf *buf, 37void evas_software_xlib_swapbuf_push_updated_region(Outbuf *buf,
38 RGBA_Image *update, 38 RGBA_Image *update,
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 959b93f5e5..c8a612e188 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -54,6 +54,7 @@ _output_engine_setup(Evas_Engine_Info_Wayland_Shm *info,
54 evas_swapbuf_state_get, 54 evas_swapbuf_state_get,
55 evas_swapbuf_rotation_get, 55 evas_swapbuf_rotation_get,
56 NULL, 56 NULL,
57 NULL,
57 evas_swapbuf_update_region_new, 58 evas_swapbuf_update_region_new,
58 evas_swapbuf_update_region_push, 59 evas_swapbuf_update_region_push,
59 evas_swapbuf_update_region_free, 60 evas_swapbuf_update_region_free,
@@ -167,7 +168,7 @@ eng_setup(Evas *eo_evas, void *einfo)
167 info->info.wl_surface); 168 info->info.wl_surface);
168 if (!ob) return 0; 169 if (!ob) return 0;
169 170
170 evas_render_engine_software_generic_update(&re->generic, ob); 171 evas_render_engine_software_generic_update(&re->generic, ob, epd->output.w, epd->output.h);
171 172
172 if ((re) && (re->generic.ob)) re->generic.ob->onebuf = ponebuf; 173 if ((re) && (re->generic.ob)) re->generic.ob->onebuf = ponebuf;
173 } 174 }
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
index 5b746d8876..835ec52f9f 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
@@ -79,7 +79,7 @@ evas_swapbuf_free(Outbuf *ob)
79 if (!ob) return; 79 if (!ob) return;
80 80
81 /* flush the output buffer */ 81 /* flush the output buffer */
82 evas_swapbuf_flush(ob); 82 evas_swapbuf_flush(ob, NULL, MODE_FULL);
83 evas_swapbuf_idle_flush(ob); 83 evas_swapbuf_idle_flush(ob);
84 evas_swapper_free(ob->priv.swapper); 84 evas_swapper_free(ob->priv.swapper);
85 eina_array_flush(&ob->priv.onebuf_regions); 85 eina_array_flush(&ob->priv.onebuf_regions);
@@ -137,7 +137,7 @@ evas_swapbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rotation, O
137 } 137 }
138} 138}
139 139
140RGBA_Image * 140void *
141evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) 141evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
142{ 142{
143 RGBA_Image *img; 143 RGBA_Image *img;
@@ -375,14 +375,16 @@ evas_swapbuf_update_region_free(Outbuf *ob EINA_UNUSED, RGBA_Image *update EINA_
375} 375}
376 376
377void 377void
378evas_swapbuf_flush(Outbuf *ob) 378evas_swapbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode render_mode)
379{ 379{
380 Eina_Rectangle *rects; 380 Eina_Rectangle *result;
381 RGBA_Image *img; 381 RGBA_Image *img;
382 unsigned int n = 0, i = 0; 382 unsigned int n = 0, i = 0;
383 383
384 LOGFN(__FILE__, __LINE__, __FUNCTION__); 384 LOGFN(__FILE__, __LINE__, __FUNCTION__);
385 385
386 if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
387
386 /* check for valid output buffer */ 388 /* check for valid output buffer */
387 if (!ob) return; 389 if (!ob) return;
388 390
@@ -397,17 +399,17 @@ evas_swapbuf_flush(Outbuf *ob)
397 if (n == 0) return; 399 if (n == 0) return;
398 400
399 /* allocate rectangles */ 401 /* allocate rectangles */
400 if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return; 402 if (!(result = alloca(n * sizeof(Eina_Rectangle)))) return;
401 403
402 /* loop the buffer regions and assign to rects */ 404 /* loop the buffer regions and assign to result */
403 EINA_ARRAY_ITER_NEXT(&ob->priv.onebuf_regions, i, rect, it) 405 EINA_ARRAY_ITER_NEXT(&ob->priv.onebuf_regions, i, rect, it)
404 rects[i] = *rect; 406 result[i] = *rect;
405 407
406 /* unmap the buffer */ 408 /* unmap the buffer */
407 evas_swapper_buffer_unmap(ob->priv.swapper); 409 evas_swapper_buffer_unmap(ob->priv.swapper);
408 410
409 /* force a buffer swap */ 411 /* force a buffer swap */
410 evas_swapper_swap(ob->priv.swapper, rects, n); 412 evas_swapper_swap(ob->priv.swapper, result, n);
411 413
412 /* clean array */ 414 /* clean array */
413 eina_array_clean(&ob->priv.onebuf_regions); 415 eina_array_clean(&ob->priv.onebuf_regions);
@@ -431,7 +433,7 @@ evas_swapbuf_flush(Outbuf *ob)
431 if (n == 0) return; 433 if (n == 0) return;
432 434
433 /* allocate rectangles */ 435 /* allocate rectangles */
434 if (!(rects = alloca(n * sizeof(Eina_Rectangle)))) return; 436 if (!(result = alloca(n * sizeof(Eina_Rectangle)))) return;
435 437
436 /* loop the pending writes */ 438 /* loop the pending writes */
437 EINA_LIST_FREE(ob->priv.pending_writes, img) 439 EINA_LIST_FREE(ob->priv.pending_writes, img)
@@ -446,35 +448,35 @@ evas_swapbuf_flush(Outbuf *ob)
446 /* based on rotation, set rectangle position */ 448 /* based on rotation, set rectangle position */
447 if (ob->rotation == 0) 449 if (ob->rotation == 0)
448 { 450 {
449 rects[i].x = x; 451 result[i].x = x;
450 rects[i].y = y; 452 result[i].y = y;
451 } 453 }
452 else if (ob->rotation == 90) 454 else if (ob->rotation == 90)
453 { 455 {
454 rects[i].x = y; 456 result[i].x = y;
455 rects[i].y = (ob->w - x - w); 457 result[i].y = (ob->w - x - w);
456 } 458 }
457 else if (ob->rotation == 180) 459 else if (ob->rotation == 180)
458 { 460 {
459 rects[i].x = (ob->w - x - w); 461 result[i].x = (ob->w - x - w);
460 rects[i].y = (ob->h - y - h); 462 result[i].y = (ob->h - y - h);
461 } 463 }
462 else if (ob->rotation == 270) 464 else if (ob->rotation == 270)
463 { 465 {
464 rects[i].x = (ob->h - y - h); 466 result[i].x = (ob->h - y - h);
465 rects[i].y = x; 467 result[i].y = x;
466 } 468 }
467 469
468 /* based on rotation, set rectangle size */ 470 /* based on rotation, set rectangle size */
469 if ((ob->rotation == 0) || (ob->rotation == 180)) 471 if ((ob->rotation == 0) || (ob->rotation == 180))
470 { 472 {
471 rects[i].w = w; 473 result[i].w = w;
472 rects[i].h = h; 474 result[i].h = h;
473 } 475 }
474 else if ((ob->rotation == 90) || (ob->rotation == 270)) 476 else if ((ob->rotation == 90) || (ob->rotation == 270))
475 { 477 {
476 rects[i].w = h; 478 result[i].w = h;
477 rects[i].h = w; 479 result[i].h = w;
478 } 480 }
479 481
480 eina_rectangle_free(rect); 482 eina_rectangle_free(rect);
@@ -493,7 +495,7 @@ evas_swapbuf_flush(Outbuf *ob)
493 evas_swapper_buffer_unmap(ob->priv.swapper); 495 evas_swapper_buffer_unmap(ob->priv.swapper);
494 496
495 /* force a buffer swap */ 497 /* force a buffer swap */
496 evas_swapper_swap(ob->priv.swapper, rects, n); 498 evas_swapper_swap(ob->priv.swapper, result, n);
497 } 499 }
498} 500}
499 501
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapbuf.h b/src/modules/evas/engines/wayland_shm/evas_swapbuf.h
index fe5b51cd2c..8716a37c29 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapbuf.h
+++ b/src/modules/evas/engines/wayland_shm/evas_swapbuf.h
@@ -6,10 +6,10 @@
6Outbuf *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); 6Outbuf *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);
7void evas_swapbuf_free(Outbuf *ob); 7void evas_swapbuf_free(Outbuf *ob);
8void evas_swapbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rotation, Outbuf_Depth depth, Eina_Bool alpha); 8void evas_swapbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rotation, Outbuf_Depth depth, Eina_Bool alpha);
9RGBA_Image *evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); 9void *evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
10void evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 10void evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
11void evas_swapbuf_update_region_free(Outbuf *ob, RGBA_Image *update); 11void evas_swapbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
12void evas_swapbuf_flush(Outbuf *ob); 12void evas_swapbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
13void evas_swapbuf_idle_flush(Outbuf *ob EINA_UNUSED); 13void evas_swapbuf_idle_flush(Outbuf *ob EINA_UNUSED);
14Render_Engine_Swap_Mode evas_swapbuf_state_get(Outbuf *ob); 14Render_Engine_Swap_Mode evas_swapbuf_state_get(Outbuf *ob);
15int evas_swapbuf_rotation_get(Outbuf *ob); 15int evas_swapbuf_rotation_get(Outbuf *ob);