ector: make the ector objects as shared object after eo changes.
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 28 Sep 2016 06:28:27 +0000 (15:28 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 28 Sep 2016 07:02:12 +0000 (16:02 +0900)
 As ector objects are acessed by draw thread we need to create it as
 shared object in order to access it from other thread.
 Note: there is some performance lag...

Summary: make ector object as shared eo object to acess from other thread.

Reviewers: cedric, jpeg, raster

Reviewed By: jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4319

src/lib/evas/canvas/evas_vg_gradient_linear.c
src/lib/evas/canvas/evas_vg_gradient_radial.c
src/lib/evas/canvas/evas_vg_shape.c
src/modules/evas/engines/gl_generic/evas_engine.c
src/modules/evas/engines/software_generic/evas_engine.c

index 11fb903..de81987 100644 (file)
@@ -74,7 +74,9 @@ _efl_vg_gradient_linear_render_pre(Eo *obj,
 
    if (!nd->renderer)
      {
+        efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
         nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN);
+        efl_domain_current_pop();
      }
 
    ector_renderer_transformation_set(nd->renderer, current);
index a83c016..9a60d65 100644 (file)
@@ -90,7 +90,9 @@ _efl_vg_gradient_radial_render_pre(Eo *obj,
 
    if (!nd->renderer)
      {
+        efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
         nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN);
+        efl_domain_current_pop();
      }
 
    ector_renderer_transformation_set(nd->renderer, current);
index 2f47f27..9b48ab3 100644 (file)
@@ -135,7 +135,9 @@ _efl_vg_shape_render_pre(Eo *obj EINA_UNUSED,
 
    if (!nd->renderer)
      {
+        efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
         nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_SHAPE_MIXIN);
+        efl_domain_current_pop();
      }
 
    ector_renderer_transformation_set(nd->renderer, current);
index 5c5417f..61b4a60 100644 (file)
@@ -2489,6 +2489,7 @@ eng_ector_create(void *data EINA_UNUSED)
    Ector_Surface *ector;
    const char *ector_backend;
    ector_backend = getenv("ECTOR_BACKEND");
+   efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
    if (ector_backend && !strcasecmp(ector_backend, "default"))
      {
         ector = efl_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
@@ -2503,6 +2504,7 @@ eng_ector_create(void *data EINA_UNUSED)
         ector = efl_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
         use_cairo = EINA_TRUE;
      }
+   efl_domain_current_pop();
    return ector;
 }
 
index 2755b48..7ab8ba4 100644 (file)
@@ -4254,6 +4254,7 @@ eng_ector_create(void *data EINA_UNUSED)
    Ector_Surface *ector;
    const char *ector_backend;
    ector_backend = getenv("ECTOR_BACKEND");
+   efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
    if (ector_backend && !strcasecmp(ector_backend, "default"))
      {
         ector = efl_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
@@ -4264,6 +4265,7 @@ eng_ector_create(void *data EINA_UNUSED)
         ector = efl_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
         use_cairo = EINA_TRUE;
      }
+   efl_domain_current_pop();
    return ector;
 }