summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2015-08-25 15:32:35 +0900
committerCedric BAIL <cedric@osg.samsung.com>2015-09-21 22:50:34 +0200
commit291c3e32af106531e4203ea4c2c69af786e0a34d (patch)
tree306de50e666374386ce3e7acacd2a8a7d5636e39 /src/lib/evas/canvas
parentb3dc08bf8bf438b531a28fc231c3ac854fe09fc9 (diff)
evas: create ector surface per engine instance.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_main.c10
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c19
2 files changed, 20 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 5e7e6ee242..1fa4d32fa5 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -278,6 +278,8 @@ _evas_canvas_eo_base_destructor(Eo *eo_e, Evas_Public_Data *e)
278 278
279 if (e->engine.func) 279 if (e->engine.func)
280 { 280 {
281 e->engine.func->ector_destroy(e->engine.data.output,
282 e->engine.ector);
281 e->engine.func->context_free(e->engine.data.output, 283 e->engine.func->context_free(e->engine.data.output,
282 e->engine.data.context); 284 e->engine.data.context);
283 e->engine.func->output_free(e->engine.data.output); 285 e->engine.func->output_free(e->engine.data.output);
@@ -693,4 +695,12 @@ _evas_canvas_evas_common_interface_evas_get(Eo *eo_e, Evas_Public_Data *e EINA_U
693 return (Evas *)eo_e; 695 return (Evas *)eo_e;
694} 696}
695 697
698Ector_Surface *
699evas_ector_get(Evas_Public_Data *e)
700{
701 if (!e->engine.ector)
702 e->engine.ector = e->engine.func->ector_create(e->engine.data.output);
703 return e->engine.ector;
704}
705
696#include "canvas/evas_canvas.eo.c" 706#include "canvas/evas_canvas.eo.c"
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 628ade6f2c..e50d787277 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -194,7 +194,7 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
194 int x, int y, Eina_Bool do_async) 194 int x, int y, Eina_Bool do_async)
195{ 195{
196 Evas_VG_Data *vd = type_private_data; 196 Evas_VG_Data *vd = type_private_data;
197 197 Ector_Surface *ector = evas_ector_get(obj->layer->evas);
198 // FIXME: Set context (that should affect Ector_Surface) and 198 // FIXME: Set context (that should affect Ector_Surface) and
199 // then call Ector_Renderer render from bottom to top. Get the 199 // then call Ector_Renderer render from bottom to top. Get the
200 // Ector_Surface that match the output from Evas engine API. 200 // Ector_Surface that match the output from Evas engine API.
@@ -219,14 +219,15 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
219 obj->cur->anti_alias); 219 obj->cur->anti_alias);
220 obj->layer->evas->engine.func->context_render_op_set(output, context, 220 obj->layer->evas->engine.func->context_render_op_set(output, context,
221 obj->cur->render_op); 221 obj->cur->render_op);
222 obj->layer->evas->engine.func->ector_begin(output, context, surface, 222 obj->layer->evas->engine.func->ector_begin(output, context,
223 ector, surface,
223 obj->cur->geometry.x + x, obj->cur->geometry.y + y, 224 obj->cur->geometry.x + x, obj->cur->geometry.y + y,
224 do_async); 225 do_async);
225 _evas_vg_render(obj, vd, 226 _evas_vg_render(obj, vd,
226 output, context, surface, 227 output, context, surface,
227 vd->root, NULL, 228 vd->root, NULL,
228 do_async); 229 do_async);
229 obj->layer->evas->engine.func->ector_end(output, context, surface, do_async); 230 obj->layer->evas->engine.func->ector_end(output, context, ector, surface, do_async);
230} 231}
231 232
232static void 233static void
@@ -236,7 +237,6 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
236{ 237{
237 Evas_VG_Data *vd = type_private_data; 238 Evas_VG_Data *vd = type_private_data;
238 Efl_VG_Base_Data *rnd; 239 Efl_VG_Base_Data *rnd;
239 Evas_Public_Data *e = obj->layer->evas;
240 int is_v, was_v; 240 int is_v, was_v;
241 Ector_Surface *s; 241 Ector_Surface *s;
242 242
@@ -258,17 +258,18 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
258 obj->cur->clipper, 258 obj->cur->clipper,
259 obj->cur->clipper->private_data); 259 obj->cur->clipper->private_data);
260 } 260 }
261
262 // FIXME: handle damage only on changed renderer.
263 s = evas_ector_get(obj->layer->evas);
264 if (vd->root && s)
265 _evas_vg_render_pre(vd->root, s, NULL);
266
261 /* now figure what changed and add draw rects */ 267 /* now figure what changed and add draw rects */
262 /* if it just became visible or invisible */ 268 /* if it just became visible or invisible */
263 is_v = evas_object_is_visible(eo_obj, obj); 269 is_v = evas_object_is_visible(eo_obj, obj);
264 was_v = evas_object_was_visible(eo_obj,obj); 270 was_v = evas_object_was_visible(eo_obj,obj);
265 if (!(is_v | was_v)) goto done; 271 if (!(is_v | was_v)) goto done;
266 272
267 // FIXME: handle damage only on changed renderer.
268 s = e->engine.func->ector_get(e->engine.data.output);
269 if (vd->root && s)
270 _evas_vg_render_pre(vd->root, s, NULL);
271
272 // FIXME: for now the walking Evas_VG_Node tree doesn't trigger any damage 273 // FIXME: for now the walking Evas_VG_Node tree doesn't trigger any damage
273 // So just forcing it here if necessary 274 // So just forcing it here if necessary
274 rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS); 275 rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS);