summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-12 19:18:09 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-12 19:18:09 +0900
commita56cc8a8c1f81dbdf9242c198c7a62523a582249 (patch)
tree9dd23fbab7ece6bc71f2565e463f323978f74621 /src/lib/evas/canvas
parent41409410490c6f56ae61c8f7de90619e9983fc83 (diff)
Evas: Avoid creating an extra context for proxy rendering
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_3d_texture.c2
-rw-r--r--src/lib/evas/canvas/evas_render.c18
2 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_3d_texture.c b/src/lib/evas/canvas/evas_3d_texture.c
index b87d14373e..8945fadea8 100644
--- a/src/lib/evas/canvas/evas_3d_texture.c
+++ b/src/lib/evas/canvas/evas_3d_texture.c
@@ -146,7 +146,7 @@ _texture_proxy_subrender(Evas_3D_Texture *obj)
146 -source->cur->geometry.x, 146 -source->cur->geometry.x,
147 -source->cur->geometry.y, 147 -source->cur->geometry.y,
148 1, 0, 0, e->output.w, e->output.h, 148 1, 0, 0, e->output.w, e->output.h,
149 &proxy_render_data, 1, EINA_FALSE); 149 &proxy_render_data, 1, EINA_FALSE, EINA_FALSE);
150 } 150 }
151 151
152 e->engine.func->context_free(e->engine.data.output, ctx); 152 e->engine.func->context_free(e->engine.data.output, ctx);
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index ea25d76642..9494d3a342 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1107,7 +1107,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1107 void *surface, int off_x, int off_y, int mapped, int ecx, 1107 void *surface, int off_x, int off_y, int mapped, int ecx,
1108 int ecy, int ecw, int ech, 1108 int ecy, int ecw, int ech,
1109 Evas_Proxy_Render_Data *proxy_render_data, int level, 1109 Evas_Proxy_Render_Data *proxy_render_data, int level,
1110 Eina_Bool do_async) 1110 Eina_Bool use_mapped_ctx, Eina_Bool do_async)
1111{ 1111{
1112 void *ctx; 1112 void *ctx;
1113 Evas_Object_Protected_Data *obj2; 1113 Evas_Object_Protected_Data *obj2;
@@ -1278,6 +1278,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1278 ecx, ecy, ecw, ech, 1278 ecx, ecy, ecw, ech,
1279 proxy_render_data, 1279 proxy_render_data,
1280 level + 1, 1280 level + 1,
1281 EINA_FALSE,
1281 do_async); 1282 do_async);
1282 /* We aren't sure this object will be rendered by 1283 /* We aren't sure this object will be rendered by
1283 normal(not proxy) drawing after, we reset this 1284 normal(not proxy) drawing after, we reset this
@@ -1394,7 +1395,10 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1394 { 1395 {
1395 RDI(level); 1396 RDI(level);
1396 RD(" draw child of mapped obj\n"); 1397 RD(" draw child of mapped obj\n");
1397 ctx = e->engine.func->context_new(e->engine.data.output); 1398 if (use_mapped_ctx)
1399 ctx = context;
1400 else
1401 ctx = e->engine.func->context_new(e->engine.data.output);
1398 if (obj->is_smart) 1402 if (obj->is_smart)
1399 { 1403 {
1400 EINA_INLIST_FOREACH 1404 EINA_INLIST_FOREACH
@@ -1406,6 +1410,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1406 ecx, ecy, ecw, ech, 1410 ecx, ecy, ecw, ech,
1407 proxy_render_data, 1411 proxy_render_data,
1408 level + 1, 1412 level + 1,
1413 EINA_FALSE,
1409 do_async); 1414 do_async);
1410 /* We aren't sure this object will be rendered by 1415 /* We aren't sure this object will be rendered by
1411 normal(not proxy) drawing after, we reset this 1416 normal(not proxy) drawing after, we reset this
@@ -1432,7 +1437,8 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1432 e->engine.data.output, ctx, 1437 e->engine.data.output, ctx,
1433 surface, off_x, off_y, EINA_FALSE); 1438 surface, off_x, off_y, EINA_FALSE);
1434 } 1439 }
1435 e->engine.func->context_free(e->engine.data.output, ctx); 1440 if (!use_mapped_ctx)
1441 e->engine.func->context_free(e->engine.data.output, ctx);
1436 } 1442 }
1437 else 1443 else
1438 { 1444 {
@@ -1545,7 +1551,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
1545 -source->cur->geometry.x, 1551 -source->cur->geometry.x,
1546 -source->cur->geometry.y, 1552 -source->cur->geometry.y,
1547 1, 0, 0, e->output.w, e->output.h, 1553 1, 0, 0, e->output.w, e->output.h,
1548 &proxy_render_data, 1, do_async); 1554 &proxy_render_data, 1, EINA_TRUE, do_async);
1549 1555
1550 e->engine.func->context_free(e->engine.data.output, ctx); 1556 e->engine.func->context_free(e->engine.data.output, ctx);
1551 proxy_write->surface = e->engine.func->image_dirty_region 1557 proxy_write->surface = e->engine.func->image_dirty_region
@@ -2022,7 +2028,9 @@ evas_render_updates_internal(Evas *eo_e,
2022 surface, off_x + fx, 2028 surface, off_x + fx,
2023 off_y + fy, 0, 2029 off_y + fy, 0,
2024 cx, cy, cw, ch, 2030 cx, cy, cw, ch,
2025 NULL, 1, do_async); 2031 NULL, 1,
2032 EINA_FALSE,
2033 do_async);
2026 e->engine.func->context_cutout_clear(e->engine.data.output, 2034 e->engine.func->context_cutout_clear(e->engine.data.output,
2027 e->engine.data.context); 2035 e->engine.data.context);
2028 } 2036 }