summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:33:19 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:33:19 +0200
commitde08a3bc0422a157ed60072710f1fa0a5508cf2a (patch)
treebf47fc671862fb467f2f63facd789198786e3126
parentf603f5ed21977be80f5577ae667c42b42e3669fb (diff)
ector: add reference point to define (0, 0) and don't repeat the same value everywhere.
-rw-r--r--src/lib/ector/cairo/ector_cairo_surface.c13
-rw-r--r--src/lib/ector/cairo/ector_cairo_surface.eo1
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_base.c1
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c4
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c4
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c4
-rw-r--r--src/lib/ector/ector_generic_surface.eo10
-rw-r--r--src/lib/ector/ector_renderer_generic_base.eo2
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c2
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.c2
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c8
-rw-r--r--src/lib/ector/software/ector_software_private.h2
-rw-r--r--src/lib/ector/software/ector_software_surface.c9
-rw-r--r--src/lib/ector/software/ector_software_surface.eo1
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c11
-rw-r--r--src/lib/evas/include/evas_private.h4
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c12
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c36
18 files changed, 88 insertions, 38 deletions
diff --git a/src/lib/ector/cairo/ector_cairo_surface.c b/src/lib/ector/cairo/ector_cairo_surface.c
index ff30135714..8e7b1043f6 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_surface.c
@@ -67,6 +67,7 @@ _ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
67 67
68typedef struct _cairo_surface_t cairo_surface_t; 68typedef struct _cairo_surface_t cairo_surface_t;
69 69
70static void (*cairo_translate)(cairo_t *cr, double tx, double ty) = NULL;
70static void (*cairo_destroy)(cairo_t *cr) = NULL; 71static void (*cairo_destroy)(cairo_t *cr) = NULL;
71static cairo_surface_t *(*cairo_image_surface_create)(int format, 72static cairo_surface_t *(*cairo_image_surface_create)(int format,
72 int width, 73 int width,
@@ -107,6 +108,18 @@ _ector_cairo_surface_context_get(Eo *obj EINA_UNUSED,
107} 108}
108 109
109static void 110static void
111_ector_cairo_surface_ector_generic_surface_reference_point_set(Eo *obj EINA_UNUSED,
112 Ector_Cairo_Surface_Data *pd,
113 int x, int y)
114{
115 if (pd->cairo)
116 {
117 USE(obj, cairo_translate, );
118 cairo_translate(pd->cairo, x, y);
119 }
120}
121
122static void
110_ector_cairo_surface_eo_base_constructor(Eo *obj, 123_ector_cairo_surface_eo_base_constructor(Eo *obj,
111 Ector_Cairo_Surface_Data *pd) 124 Ector_Cairo_Surface_Data *pd)
112{ 125{
diff --git a/src/lib/ector/cairo/ector_cairo_surface.eo b/src/lib/ector/cairo/ector_cairo_surface.eo
index 10f6d9f30e..298c681d78 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.eo
+++ b/src/lib/ector/cairo/ector_cairo_surface.eo
@@ -23,6 +23,7 @@ class Ector.Cairo.Surface (Ector.Generic.Surface)
23 } 23 }
24 implements { 24 implements {
25 Ector.Generic.Surface.renderer_factory_new; 25 Ector.Generic.Surface.renderer_factory_new;
26 Ector.Generic.Surface.reference_point.set;
26 Eo.Base.destructor; 27 Eo.Base.destructor;
27 Eo.Base.constructor; 28 Eo.Base.constructor;
28 } 29 }
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_base.c b/src/lib/ector/cairo/ector_renderer_cairo_base.c
index 5e1c0606cc..190fb8a090 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_base.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_base.c
@@ -138,7 +138,6 @@ _ector_renderer_cairo_base_ector_renderer_generic_base_draw(Eo *obj,
138 Ector_Renderer_Cairo_Base_Data *pd, 138 Ector_Renderer_Cairo_Base_Data *pd,
139 Ector_Rop op, 139 Ector_Rop op,
140 Eina_Array *clips EINA_UNUSED, 140 Eina_Array *clips EINA_UNUSED,
141 int x, int y,
142 unsigned int mul_col) 141 unsigned int mul_col)
143{ 142{
144 double r, g, b, a; 143 double r, g, b, a;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
index e00ed6d8c0..19f30558a3 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
@@ -68,7 +68,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_prepare(Eo *ob
68static Eina_Bool 68static Eina_Bool
69_ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_draw(Eo *obj, 69_ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_draw(Eo *obj,
70 Ector_Renderer_Cairo_Gradient_Linear_Data *pd, 70 Ector_Renderer_Cairo_Gradient_Linear_Data *pd,
71 Ector_Rop op, Eina_Array *clips, int x, int y, unsigned int mul_col) 71 Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
72{ 72{
73 Ector_Renderer_Generic_Gradient_Linear_Data *gld; 73 Ector_Renderer_Generic_Gradient_Linear_Data *gld;
74 74
@@ -76,7 +76,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_draw(Eo *obj,
76 gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN); 76 gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN);
77 if (!pd->pat || !gld) return EINA_FALSE; 77 if (!pd->pat || !gld) return EINA_FALSE;
78 78
79 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_draw(op, clips, x, y, mul_col)); 79 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_draw(op, clips, mul_col));
80 80
81 USE(obj, cairo_rectangle, EINA_FALSE); 81 USE(obj, cairo_rectangle, EINA_FALSE);
82 USE(obj, cairo_fill, EINA_FALSE); 82 USE(obj, cairo_fill, EINA_FALSE);
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
index a219375f93..521b06da9e 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -72,7 +72,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *ob
72 72
73// Clearly duplicated and should be in a common place... 73// Clearly duplicated and should be in a common place...
74static Eina_Bool 74static Eina_Bool
75_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd, Ector_Rop op, Eina_Array *clips, int x, int y, unsigned int mul_col) 75_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
76{ 76{
77 Ector_Renderer_Generic_Gradient_Radial_Data *gld; 77 Ector_Renderer_Generic_Gradient_Radial_Data *gld;
78 78
@@ -80,7 +80,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj,
80 gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN); 80 gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
81 if (!pd->pat || !gld) return EINA_FALSE; 81 if (!pd->pat || !gld) return EINA_FALSE;
82 82
83 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, x, y, mul_col)); 83 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, mul_col));
84 84
85 USE(obj, cairo_arc, EINA_FALSE); 85 USE(obj, cairo_arc, EINA_FALSE);
86 USE(obj, cairo_fill, EINA_FALSE); 86 USE(obj, cairo_fill, EINA_FALSE);
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index a3fd1070c2..497c59d52f 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -128,12 +128,12 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_R
128} 128}
129 129
130static Eina_Bool 130static Eina_Bool
131_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, int x, int y, unsigned int mul_col) 131_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
132{ 132{
133 if (pd->path == NULL) return EINA_FALSE; 133 if (pd->path == NULL) return EINA_FALSE;
134 134
135 // FIXME: find a way to set multiple clips 135 // FIXME: find a way to set multiple clips
136 eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_draw(op, clips, x, y, mul_col)); 136 eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_draw(op, clips, mul_col));
137 137
138 USE(obj, cairo_new_path, EINA_FALSE); 138 USE(obj, cairo_new_path, EINA_FALSE);
139 USE(obj, cairo_append_path, EINA_FALSE); 139 USE(obj, cairo_append_path, EINA_FALSE);
diff --git a/src/lib/ector/ector_generic_surface.eo b/src/lib/ector/ector_generic_surface.eo
index 18ebd47c60..42a5f3e8a3 100644
--- a/src/lib/ector/ector_generic_surface.eo
+++ b/src/lib/ector/ector_generic_surface.eo
@@ -14,6 +14,15 @@ abstract Ector.Generic.Surface (Eo.Base)
14 int h; /*@ in */ 14 int h; /*@ in */
15 } 15 }
16 } 16 }
17 reference_point {
18 set {
19 /*@ This define where is (0,0) in pixels coordinate inside the surface */
20 }
21 values {
22 int x;
23 int y;
24 }
25 }
17 } 26 }
18 methods { 27 methods {
19 renderer_factory_new { 28 renderer_factory_new {
@@ -35,5 +44,6 @@ abstract Ector.Generic.Surface (Eo.Base)
35 } 44 }
36 implements { 45 implements {
37 @virtual .renderer_factory_new; 46 @virtual .renderer_factory_new;
47 @virtual .reference_point.set;
38 } 48 }
39} 49}
diff --git a/src/lib/ector/ector_renderer_generic_base.eo b/src/lib/ector/ector_renderer_generic_base.eo
index 5e5d6aa3b9..50e7e94cdc 100644
--- a/src/lib/ector/ector_renderer_generic_base.eo
+++ b/src/lib/ector/ector_renderer_generic_base.eo
@@ -96,8 +96,6 @@ abstract Ector.Renderer.Generic.Base (Eo.Base)
96 params { 96 params {
97 @in Ector_Rop op; 97 @in Ector_Rop op;
98 @in array<Eina_Rectangle *> *clips; /*@ array of Eina_Rectangle clip */ 98 @in array<Eina_Rectangle *> *clips; /*@ array of Eina_Rectangle clip */
99 @in int x;
100 @in int y;
101 @in uint mul_col; 99 @in uint mul_col;
102 } 100 }
103 } 101 }
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.c b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
index 8bbf23d73a..a6e32b008b 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -57,7 +57,7 @@ static Eina_Bool
57_ector_renderer_software_gradient_linear_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED, 57_ector_renderer_software_gradient_linear_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
58 Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED, 58 Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED,
59 Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED, 59 Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED,
60 int x EINA_UNUSED, int y EINA_UNUSED, unsigned int mul_col EINA_UNUSED) 60 unsigned int mul_col EINA_UNUSED)
61{ 61{
62 return EINA_TRUE; 62 return EINA_TRUE;
63} 63}
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.c b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
index 4bcf2a1594..41d24cbf11 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
@@ -66,7 +66,7 @@ static Eina_Bool
66_ector_renderer_software_gradient_radial_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED, 66_ector_renderer_software_gradient_radial_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
67 Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED, 67 Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED,
68 Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED, 68 Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED,
69 int x EINA_UNUSED, int y EINA_UNUSED, unsigned int mul_col EINA_UNUSED) 69 unsigned int mul_col EINA_UNUSED)
70{ 70{
71 return EINA_TRUE; 71 return EINA_TRUE;
72} 72}
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index cdecce9e87..8793c527cf 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -281,11 +281,13 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj, Ecto
281} 281}
282 282
283static Eina_Bool 283static Eina_Bool
284_ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED, Ector_Renderer_Software_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, int x, int y, unsigned int mul_col) 284_ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED, Ector_Renderer_Software_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
285{ 285{
286 int x, y;
287
286 // adjust the offset 288 // adjust the offset
287 x = x + (int)pd->base->origin.x; 289 x = pd->surface->x + (int)pd->base->origin.x;
288 y = y + (int)pd->base->origin.y; 290 y = pd->surface->y + (int)pd->base->origin.y;
289 291
290 // fill the span_data structure 292 // fill the span_data structure
291 ector_software_rasterizer_clip_rect_set(pd->surface->software, clips); 293 ector_software_rasterizer_clip_rect_set(pd->surface->software, clips);
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index b43dcfea06..bf2adf6998 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -114,6 +114,8 @@ typedef struct _Software_Rasterizer
114struct _Ector_Software_Surface_Data 114struct _Ector_Software_Surface_Data
115{ 115{
116 Software_Rasterizer *software; 116 Software_Rasterizer *software;
117 int x;
118 int y;
117}; 119};
118 120
119 121
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index e32477ecc0..1999feae68 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -90,5 +90,14 @@ _ector_software_surface_eo_base_destructor(Eo *obj EINA_UNUSED,
90 eo_do_super(obj, ECTOR_SOFTWARE_SURFACE_CLASS, eo_destructor()); 90 eo_do_super(obj, ECTOR_SOFTWARE_SURFACE_CLASS, eo_destructor());
91} 91}
92 92
93static void
94_ector_software_surface_ector_generic_surface_reference_point_set(Eo *obj EINA_UNUSED,
95 Ector_Software_Surface_Data *pd,
96 int x, int y)
97{
98 pd->x = x;
99 pd->y = y;
100}
101
93#include "ector_software_surface.eo.c" 102#include "ector_software_surface.eo.c"
94#include "ector_renderer_software_base.eo.c" 103#include "ector_renderer_software_base.eo.c"
diff --git a/src/lib/ector/software/ector_software_surface.eo b/src/lib/ector/software/ector_software_surface.eo
index 58a6a771f6..3ed863c0c8 100644
--- a/src/lib/ector/software/ector_software_surface.eo
+++ b/src/lib/ector/software/ector_software_surface.eo
@@ -27,6 +27,7 @@ class Ector.Software.Surface (Ector.Generic.Surface)
27 27
28 implements { 28 implements {
29 Ector.Generic.Surface.renderer_factory_new; 29 Ector.Generic.Surface.renderer_factory_new;
30 Ector.Generic.Surface.reference_point.set;
30 Eo.Base.destructor; 31 Eo.Base.destructor;
31 Eo.Base.constructor; 32 Eo.Base.constructor;
32 } 33 }
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 2336d9b6e5..fa682af234 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -126,7 +126,7 @@ _evas_vg_eo_base_constructor(Eo *eo_obj, Evas_VG_Data *pd)
126static void 126static void
127_evas_vg_render(Evas_Object_Protected_Data *obj, 127_evas_vg_render(Evas_Object_Protected_Data *obj,
128 void *output, void *context, void *surface, Efl_VG *n, 128 void *output, void *context, void *surface, Efl_VG *n,
129 Eina_Array *clips, int x, int y, Eina_Bool do_async) 129 Eina_Array *clips, Eina_Bool do_async)
130{ 130{
131 Efl_VG_Container_Data *vd = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS); 131 Efl_VG_Container_Data *vd = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS);
132 132
@@ -138,7 +138,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj,
138 EINA_LIST_FOREACH(vd->children, l, child) 138 EINA_LIST_FOREACH(vd->children, l, child)
139 _evas_vg_render(obj, 139 _evas_vg_render(obj,
140 output, context, surface, child, 140 output, context, surface, child,
141 clips, x, y, do_async); 141 clips, do_async);
142 } 142 }
143 else 143 else
144 { 144 {
@@ -146,7 +146,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj,
146 146
147 nd = eo_data_scope_get(n, EFL_VG_BASE_CLASS); 147 nd = eo_data_scope_get(n, EFL_VG_BASE_CLASS);
148 148
149 obj->layer->evas->engine.func->ector_renderer_draw(output, context, surface, nd->renderer, clips, x, y, do_async); 149 obj->layer->evas->engine.func->ector_renderer_draw(output, context, surface, nd->renderer, clips, do_async);
150 } 150 }
151} 151}
152 152
@@ -179,9 +179,10 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
179 context); 179 context);
180 obj->layer->evas->engine.func->context_render_op_set(output, context, 180 obj->layer->evas->engine.func->context_render_op_set(output, context,
181 obj->cur->render_op); 181 obj->cur->render_op);
182 obj->layer->evas->engine.func->ector_begin(output, context, surface, do_async); 182 obj->layer->evas->engine.func->ector_begin(output, context, surface,
183 obj->cur->geometry.x + x, obj->cur->geometry.y + y,
184 do_async);
183 _evas_vg_render(obj, output, context, surface, vd->root, NULL, 185 _evas_vg_render(obj, output, context, surface, vd->root, NULL,
184 obj->cur->geometry.x + x, obj->cur->geometry.y + y,
185 do_async); 186 do_async);
186 obj->layer->evas->engine.func->ector_end(output, context, surface, do_async); 187 obj->layer->evas->engine.func->ector_end(output, context, surface, do_async);
187} 188}
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 9fb51b4dc9..e45565c9b2 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1368,8 +1368,8 @@ struct _Evas_Func
1368 void (*texture_image_set) (void *data, void *texture, void *image); 1368 void (*texture_image_set) (void *data, void *texture, void *image);
1369 1369
1370 Ector_Surface *(*ector_get) (void *data); 1370 Ector_Surface *(*ector_get) (void *data);
1371 void (*ector_begin) (void *data, void *context, void *surface, Eina_Bool do_async); 1371 void (*ector_begin) (void *data, void *context, void *surface, int x, int y, Eina_Bool do_async);
1372 void (*ector_renderer_draw) (void *data, void *context, void *surface, Ector_Renderer *r, Eina_Array *clips, int x, int y, Eina_Bool do_async); 1372 void (*ector_renderer_draw) (void *data, void *context, void *surface, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async);
1373 void (*ector_end) (void *data, void *context, void *surface, Eina_Bool do_async); 1373 void (*ector_end) (void *data, void *context, void *surface, Eina_Bool do_async);
1374}; 1374};
1375 1375
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 5865d4ba25..871ffbb67f 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2132,7 +2132,7 @@ _evas_render_op_to_ector_rop(Evas_Render_Op op)
2132} 2132}
2133 2133
2134static void 2134static void
2135eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ector_Renderer *renderer, Eina_Array *clips, int x, int y, Eina_Bool do_async EINA_UNUSED) 2135eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED)
2136{ 2136{
2137 Evas_GL_Image *dst = surface; 2137 Evas_GL_Image *dst = surface;
2138 Evas_Engine_GL_Context *gc; 2138 Evas_Engine_GL_Context *gc;
@@ -2186,8 +2186,6 @@ eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ec
2186 eo_do(renderer, 2186 eo_do(renderer,
2187 ector_renderer_draw(_evas_render_op_to_ector_rop(gc->dc->render_op), 2187 ector_renderer_draw(_evas_render_op_to_ector_rop(gc->dc->render_op),
2188 c, 2188 c,
2189 x,
2190 y,
2191 // mul_col will be applied by GL during ector_end 2189 // mul_col will be applied by GL during ector_end
2192 0xffffffff)); 2190 0xffffffff));
2193 2191
@@ -2199,7 +2197,7 @@ eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ec
2199static void *software_buffer = NULL; 2197static void *software_buffer = NULL;
2200 2198
2201static void 2199static void
2202eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, Eina_Bool do_async EINA_UNUSED) 2200eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, int x, int y, Eina_Bool do_async EINA_UNUSED)
2203{ 2201{
2204 Evas_Engine_GL_Context *gl_context; 2202 Evas_Engine_GL_Context *gl_context;
2205 Render_Engine_GL_Generic *re = data; 2203 Render_Engine_GL_Generic *re = data;
@@ -2216,12 +2214,14 @@ eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface
2216 if (use_cairo) 2214 if (use_cairo)
2217 { 2215 {
2218 eo_do(_software_ector, 2216 eo_do(_software_ector,
2219 ector_cairo_software_surface_set(software_buffer, w, h)); 2217 ector_cairo_software_surface_set(software_buffer, w, h),
2218 ector_surface_reference_point_set(x, y));
2220 } 2219 }
2221 else 2220 else
2222 { 2221 {
2223 eo_do(_software_ector, 2222 eo_do(_software_ector,
2224 ector_software_surface_set(software_buffer, w, h)); 2223 ector_software_surface_set(software_buffer, w, h),
2224 ector_surface_reference_point_set(x, y));
2225 } 2225 }
2226} 2226}
2227 2227
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 6323ba43ca..88475d6504 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -397,7 +397,6 @@ struct _Evas_Thread_Command_Ector
397 397
398 DATA32 mul_col; 398 DATA32 mul_col;
399 Ector_Rop render_op; 399 Ector_Rop render_op;
400 int x, y;
401 400
402 Eina_Bool free_it; 401 Eina_Bool free_it;
403}; 402};
@@ -405,6 +404,7 @@ struct _Evas_Thread_Command_Ector
405struct _Evas_Thread_Command_Ector_Surface 404struct _Evas_Thread_Command_Ector_Surface
406{ 405{
407 void *surface; 406 void *surface;
407 int x, y;
408}; 408};
409 409
410Eina_Mempool *_mp_command_rect = NULL; 410Eina_Mempool *_mp_command_rect = NULL;
@@ -3513,15 +3513,13 @@ _draw_thread_ector_draw(void *data)
3513 eo_do(ector->r, 3513 eo_do(ector->r,
3514 ector_renderer_draw(ector->render_op, 3514 ector_renderer_draw(ector->render_op,
3515 ector->clips, 3515 ector->clips,
3516 ector->x,
3517 ector->y,
3518 ector->mul_col)); 3516 ector->mul_col));
3519 3517
3520 _draw_thread_ector_cleanup(ector); 3518 _draw_thread_ector_cleanup(ector);
3521} 3519}
3522 3520
3523static void 3521static void
3524eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ector_Renderer *renderer, Eina_Array *clips, int x, int y, Eina_Bool do_async) 3522eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async)
3525{ 3523{
3526 RGBA_Image *dst = surface; 3524 RGBA_Image *dst = surface;
3527 RGBA_Draw_Context *dc = context; 3525 RGBA_Draw_Context *dc = context;
@@ -3576,8 +3574,6 @@ eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ec
3576 ector.render_op = _evas_render_op_to_ector_rop(dc->render_op); 3574 ector.render_op = _evas_render_op_to_ector_rop(dc->render_op);
3577 ector.mul_col = ector_color_multiply(dc->mul.use ? dc->mul.col : 0xffffffff, 3575 ector.mul_col = ector_color_multiply(dc->mul.use ? dc->mul.col : 0xffffffff,
3578 dc->col.col);; 3576 dc->col.col);;
3579 ector.x = x;
3580 ector.y = y;
3581 ector.free_it = EINA_FALSE; 3577 ector.free_it = EINA_FALSE;
3582 3578
3583 if (do_async) 3579 if (do_async)
@@ -3610,23 +3606,29 @@ _draw_thread_ector_surface_set(void *data)
3610 void *pixels = NULL; 3606 void *pixels = NULL;
3611 unsigned int w = 0; 3607 unsigned int w = 0;
3612 unsigned int h = 0; 3608 unsigned int h = 0;
3609 unsigned int x = 0;
3610 unsigned int y = 0;
3613 3611
3614 if (surface) 3612 if (surface)
3615 { 3613 {
3616 pixels = evas_cache_image_pixels(&surface->cache_entry); 3614 pixels = evas_cache_image_pixels(&surface->cache_entry);
3617 w = surface->cache_entry.w; 3615 w = surface->cache_entry.w;
3618 h = surface->cache_entry.h; 3616 h = surface->cache_entry.h;
3617 x = ector_surface->x;
3618 y = ector_surface->y;
3619 } 3619 }
3620 3620
3621 if (use_cairo) 3621 if (use_cairo)
3622 { 3622 {
3623 eo_do(_software_ector, 3623 eo_do(_software_ector,
3624 ector_cairo_software_surface_set(pixels, w, h)); 3624 ector_cairo_software_surface_set(pixels, w, h),
3625 ector_surface_reference_point_set(x, y));
3625 } 3626 }
3626 else 3627 else
3627 { 3628 {
3628 eo_do(_software_ector, 3629 eo_do(_software_ector,
3629 ector_software_surface_set(pixels, w, h)); 3630 ector_software_surface_set(pixels, w, h),
3631 ector_surface_reference_point_set(x, y));
3630 } 3632 }
3631 3633
3632 evas_common_cpu_end_opt(); 3634 evas_common_cpu_end_opt();
@@ -3635,7 +3637,7 @@ _draw_thread_ector_surface_set(void *data)
3635} 3637}
3636 3638
3637static void 3639static void
3638eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, Eina_Bool do_async) 3640eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, int x, int y, Eina_Bool do_async)
3639{ 3641{
3640 if (do_async) 3642 if (do_async)
3641 { 3643 {
@@ -3645,6 +3647,8 @@ eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface
3645 if (!nes) return ; 3647 if (!nes) return ;
3646 3648
3647 nes->surface = surface; 3649 nes->surface = surface;
3650 nes->x = x;
3651 nes->y = y;
3648 3652
3649 evas_thread_cmd_enqueue(_draw_thread_ector_surface_set, nes); 3653 evas_thread_cmd_enqueue(_draw_thread_ector_surface_set, nes);
3650 } 3654 }
@@ -3659,8 +3663,18 @@ eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface
3659 w = sf->cache_entry.w; 3663 w = sf->cache_entry.w;
3660 h = sf->cache_entry.h; 3664 h = sf->cache_entry.h;
3661 3665
3662 eo_do(_software_ector, 3666 if (use_cairo)
3663 ector_cairo_software_surface_set(pixels, w, h)); 3667 {
3668 eo_do(_software_ector,
3669 ector_cairo_software_surface_set(pixels, w, h),
3670 ector_surface_reference_point_set(x, y));
3671 }
3672 else
3673 {
3674 eo_do(_software_ector,
3675 ector_software_surface_set(pixels, w, h),
3676 ector_surface_reference_point_set(x, y));
3677 }
3664 } 3678 }
3665} 3679}
3666 3680