summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/evas/engines/software_x11')
-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
7 files changed, 59 insertions, 50 deletions
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,