summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-12 19:25:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-12 19:25:21 +0900
commit5a13e97c1b9501a247c6a78d2194f66fae07f7fe (patch)
treeb7918d7a463edf1d1c3cc883d0d4a7cc025c6cf1 /src/lib/evas/canvas
parenta56cc8a8c1f81dbdf9242c198c7a62523a582249 (diff)
Evas: Use ENFN/ENDT in proxy subrender
Again, just a code readability change.
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_render.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 9494d3a342..4a340ee48f 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -89,6 +89,10 @@ do \
89 eina_array_flush(array); \ 89 eina_array_flush(array); \
90} 90}
91 91
92/* save typing */
93#define ENFN evas->engine.func
94#define ENDT evas->engine.data.output
95
92typedef struct _Render_Updates Render_Updates; 96typedef struct _Render_Updates Render_Updates;
93struct _Render_Updates 97struct _Render_Updates
94{ 98{
@@ -1489,7 +1493,7 @@ void
1489evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy, 1493evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy,
1490 Evas_Object_Protected_Data *proxy_obj, Eina_Bool do_async) 1494 Evas_Object_Protected_Data *proxy_obj, Eina_Bool do_async)
1491{ 1495{
1492 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 1496 Evas_Public_Data *evas = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1493 Evas_Object_Protected_Data *source; 1497 Evas_Object_Protected_Data *source;
1494 Eina_Bool source_clip = EINA_FALSE; 1498 Eina_Bool source_clip = EINA_FALSE;
1495 void *ctx; 1499 void *ctx;
@@ -1510,8 +1514,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
1510 if ((proxy_write->surface) && 1514 if ((proxy_write->surface) &&
1511 ((proxy_write->w != w) || (proxy_write->h != h))) 1515 ((proxy_write->w != w) || (proxy_write->h != h)))
1512 { 1516 {
1513 e->engine.func->image_map_surface_free(e->engine.data.output, 1517 ENFN->image_map_surface_free(ENDT, proxy_write->surface);
1514 proxy_write->surface);
1515 proxy_write->surface = NULL; 1518 proxy_write->surface = NULL;
1516 } 1519 }
1517 1520
@@ -1519,24 +1522,19 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
1519 /* FIXME (cont): Should see if the object has alpha */ 1522 /* FIXME (cont): Should see if the object has alpha */
1520 if (!proxy_write->surface) 1523 if (!proxy_write->surface)
1521 { 1524 {
1522 proxy_write->surface = e->engine.func->image_map_surface_new 1525 proxy_write->surface = ENFN->image_map_surface_new(ENDT, w, h, 1);
1523 (e->engine.data.output, w, h, 1);
1524 if (!proxy_write->surface) goto end; 1526 if (!proxy_write->surface) goto end;
1525 proxy_write->w = w; 1527 proxy_write->w = w;
1526 proxy_write->h = h; 1528 proxy_write->h = h;
1527 } 1529 }
1528 1530
1529 ctx = e->engine.func->context_new(e->engine.data.output); 1531 ctx = ENFN->context_new(ENDT);
1530 e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 1532 ENFN->context_color_set(ENDT, ctx, 0, 0,0, 0);
1531 0, 0); 1533 ENFN->context_render_op_set(ENDT, ctx,EVAS_RENDER_COPY);
1532 e->engine.func->context_render_op_set(e->engine.data.output, ctx, 1534 ENFN->rectangle_draw(ENDT, ctx, proxy_write->surface, 0, 0, w, h, do_async);
1533 EVAS_RENDER_COPY); 1535 ENFN->context_free(ENDT, ctx);
1534 e->engine.func->rectangle_draw(e->engine.data.output, ctx,
1535 proxy_write->surface, 0, 0, w, h,
1536 do_async);
1537 e->engine.func->context_free(e->engine.data.output, ctx);
1538 1536
1539 ctx = e->engine.func->context_new(e->engine.data.output); 1537 ctx = ENFN->context_new(ENDT);
1540 1538
1541 if (eo_isa(eo_proxy, EVAS_IMAGE_CLASS)) 1539 if (eo_isa(eo_proxy, EVAS_IMAGE_CLASS))
1542 eo_do(eo_proxy, source_clip = evas_obj_image_source_clip_get()); 1540 eo_do(eo_proxy, source_clip = evas_obj_image_source_clip_get());
@@ -1547,15 +1545,14 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
1547 .eo_src = eo_source, 1545 .eo_src = eo_source,
1548 .source_clip = source_clip 1546 .source_clip = source_clip
1549 }; 1547 };
1550 evas_render_mapped(e, eo_source, source, ctx, proxy_write->surface, 1548 evas_render_mapped(evas, eo_source, source, ctx, proxy_write->surface,
1551 -source->cur->geometry.x, 1549 -source->cur->geometry.x,
1552 -source->cur->geometry.y, 1550 -source->cur->geometry.y,
1553 1, 0, 0, e->output.w, e->output.h, 1551 1, 0, 0, evas->output.w, evas->output.h,
1554 &proxy_render_data, 1, EINA_TRUE, do_async); 1552 &proxy_render_data, 1, EINA_TRUE, do_async);
1555 1553
1556 e->engine.func->context_free(e->engine.data.output, ctx); 1554 ENFN->context_free(ENDT, ctx);
1557 proxy_write->surface = e->engine.func->image_dirty_region 1555 proxy_write->surface = ENFN->image_dirty_region(ENDT, proxy_write->surface, 0, 0, w, h);
1558 (e->engine.data.output, proxy_write->surface, 0, 0, w, h);
1559 } 1556 }
1560 end: 1557 end:
1561 EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write); 1558 EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write);