summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c22
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo1
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c22
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo1
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c25
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.eo1
-rw-r--r--src/lib/ector/ector_private.h10
-rw-r--r--src/lib/ector/ector_renderer_base.c16
-rw-r--r--src/lib/ector/ector_renderer_generic_base.eo5
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c16
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.eo1
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.c16
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.eo1
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c25
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.eo1
15 files changed, 163 insertions, 0 deletions
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 2eece58..cf354b4 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
@@ -163,4 +163,26 @@ _ector_renderer_cairo_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj,
163 efl_gfx_gradient_stop_set(colors, length)); 163 efl_gfx_gradient_stop_set(colors, length));
164} 164}
165 165
166static unsigned int
167_ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Cairo_Gradient_Linear_Data *pd EINA_UNUSED)
168{
169 Ector_Renderer_Generic_Gradient_Linear_Data *gld;
170 Ector_Renderer_Generic_Gradient_Data *gd;
171 unsigned int crc;
172
173 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS,
174 crc = ector_renderer_crc_get());
175
176 gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN);
177 gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
178 if (!gd || !gld) return crc;
179
180 crc = eina_crc((void*) gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
181 if (gd->colors_count)
182 crc = eina_crc((void*) gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * gd->colors_count, crc, EINA_FALSE);
183 crc = eina_crc((void*) gld, sizeof (Ector_Renderer_Generic_Gradient_Linear_Data), crc, EINA_FALSE);
184
185 return crc;
186}
187
166#include "ector_renderer_cairo_gradient_linear.eo.c" 188#include "ector_renderer_cairo_gradient_linear.eo.c"
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
index 64c6056..2085f69 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Cairo.Gradient_Linear (Ector.Renderer.Cairo.Base, Ector.Ren
6 Ector.Renderer.Generic.Base.prepare; 6 Ector.Renderer.Generic.Base.prepare;
7 Ector.Renderer.Generic.Base.draw; 7 Ector.Renderer.Generic.Base.draw;
8 Ector.Renderer.Generic.Base.bounds_get; 8 Ector.Renderer.Generic.Base.bounds_get;
9 Ector.Renderer.Generic.Base.crc.get;
9 Ector.Renderer.Cairo.Base.fill; 10 Ector.Renderer.Cairo.Base.fill;
10 Eo.Base.destructor; 11 Eo.Base.destructor;
11 Efl.Gfx.Gradient.Base.stop.set; 12 Efl.Gfx.Gradient.Base.stop.set;
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 508632b..0857e25 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -168,4 +168,26 @@ _ector_renderer_cairo_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj,
168 efl_gfx_gradient_stop_set(colors, length)); 168 efl_gfx_gradient_stop_set(colors, length));
169} 169}
170 170
171static unsigned int
172_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd EINA_UNUSED)
173{
174 Ector_Renderer_Generic_Gradient_Radial_Data *grd;
175 Ector_Renderer_Generic_Gradient_Data *gd;
176 unsigned int crc;
177
178 eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
179 crc = ector_renderer_crc_get());
180
181 grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
182 gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
183 if (!grd || !gd) return crc;
184
185 crc = eina_crc((void*) gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
186 if (gd->colors_count)
187 crc = eina_crc((void*) gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * gd->colors_count, crc, EINA_FALSE);
188 crc = eina_crc((void*) grd, sizeof (Ector_Renderer_Generic_Gradient_Radial_Data), crc, EINA_FALSE);
189
190 return crc;
191}
192
171#include "ector_renderer_cairo_gradient_radial.eo.c" 193#include "ector_renderer_cairo_gradient_radial.eo.c"
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
index c05ad9e..0b3ae92 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Cairo.Gradient_Radial (Ector.Renderer.Cairo.Base, Ector.Ren
6 Ector.Renderer.Generic.Base.prepare; 6 Ector.Renderer.Generic.Base.prepare;
7 Ector.Renderer.Generic.Base.draw; 7 Ector.Renderer.Generic.Base.draw;
8 Ector.Renderer.Generic.Base.bounds_get; 8 Ector.Renderer.Generic.Base.bounds_get;
9 Ector.Renderer.Generic.Base.crc.get;
9 Ector.Renderer.Cairo.Base.fill; 10 Ector.Renderer.Cairo.Base.fill;
10 Eo.Base.destructor; 11 Eo.Base.destructor;
11 Efl.Gfx.Gradient.Base.stop.set; 12 Efl.Gfx.Gradient.Base.stop.set;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index ac06da0..c598a2c 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -293,5 +293,30 @@ _ector_renderer_cairo_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Sha
293 if (pd->path) cairo_path_destroy(pd->path); 293 if (pd->path) cairo_path_destroy(pd->path);
294} 294}
295 295
296unsigned int
297_ector_renderer_cairo_shape_ector_renderer_generic_base_crc_get(Eo *obj,
298 Ector_Renderer_Cairo_Shape_Data *pd)
299{
300 unsigned int crc;
301
302 eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS,
303 crc = ector_renderer_crc_get());
304
305 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
306 crc = eina_crc((void*) &pd->shape->stroke.scale, sizeof (pd->shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered
307 crc = eina_crc((void*) &pd->shape->stroke.color, sizeof (pd->shape->stroke.color), crc, EINA_FALSE);
308 crc = eina_crc((void*) &pd->shape->stroke.cap, sizeof (pd->shape->stroke.cap), crc, EINA_FALSE);
309 crc = eina_crc((void*) &pd->shape->stroke.join, sizeof (pd->shape->stroke.join), crc, EINA_FALSE);
310
311 if (pd->shape->fill) crc = _renderer_crc_get(pd->shape->fill, crc);
312 if (pd->shape->stroke.fill) crc = _renderer_crc_get(pd->shape->stroke.fill, crc);
313 if (pd->shape->stroke.marker) crc = _renderer_crc_get(pd->shape->stroke.marker, crc);
314 if (pd->shape->stroke.dash_length)
315 {
316 crc = eina_crc((void*) pd->shape->stroke.dash, sizeof (Efl_Gfx_Dash) * pd->shape->stroke.dash_length, crc, EINA_FALSE);
317 }
318
319 return crc;
320}
296 321
297#include "ector_renderer_cairo_shape.eo.c" 322#include "ector_renderer_cairo_shape.eo.c"
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
index e9d4a17..298935b 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Cairo.Shape (Ector.Renderer.Cairo.Base, Ector.Renderer.Gene
6 Ector.Renderer.Generic.Base.prepare; 6 Ector.Renderer.Generic.Base.prepare;
7 Ector.Renderer.Generic.Base.draw; 7 Ector.Renderer.Generic.Base.draw;
8 Ector.Renderer.Generic.Base.bounds_get; 8 Ector.Renderer.Generic.Base.bounds_get;
9 Ector.Renderer.Generic.Base.crc.get;
9 Ector.Renderer.Cairo.Base.fill; 10 Ector.Renderer.Cairo.Base.fill;
10 Eo.Base.constructor; 11 Eo.Base.constructor;
11 Eo.Base.destructor; 12 Eo.Base.destructor;
diff --git a/src/lib/ector/ector_private.h b/src/lib/ector/ector_private.h
index 31072d2..099542b 100644
--- a/src/lib/ector/ector_private.h
+++ b/src/lib/ector/ector_private.h
@@ -145,4 +145,14 @@ struct _Ector_Renderer_Generic_Shape_Data
145 } stroke; 145 } stroke;
146}; 146};
147 147
148static inline unsigned int
149_renderer_crc_get(Eo *obj, unsigned int crc)
150{
151 unsigned int id;
152
153 eo_do(obj, id = ector_renderer_crc_get());
154 crc = eina_crc((void*) &id, sizeof (id), crc, EINA_FALSE);
155 return crc;
156}
157
148#endif 158#endif
diff --git a/src/lib/ector/ector_renderer_base.c b/src/lib/ector/ector_renderer_base.c
index b4c44c9..4c84eba 100644
--- a/src/lib/ector/ector_renderer_base.c
+++ b/src/lib/ector/ector_renderer_base.c
@@ -135,4 +135,20 @@ _ector_renderer_generic_base_prepare(Eo *obj EINA_UNUSED,
135 return EINA_TRUE; 135 return EINA_TRUE;
136} 136}
137 137
138static unsigned int
139_ector_renderer_generic_base_crc_get(Eo *obj EINA_UNUSED,
140 Ector_Renderer_Generic_Base_Data *pd)
141{
142 unsigned int crc;
143
144 crc = eina_crc((void*) &pd->color, sizeof(pd->color), 0xffffffff, EINA_TRUE);
145 crc = eina_crc((void*) &pd->q, sizeof(pd->q), crc, EINA_FALSE);
146 crc = eina_crc((void*) &pd->origin, sizeof(pd->origin), crc, EINA_FALSE);
147
148 if (pd->m) crc = eina_crc((void*) pd->m, sizeof(Eina_Matrix3), crc, EINA_FALSE);
149 if (pd->mask) crc = _renderer_crc_get(pd->mask, crc);
150
151 return crc;
152}
153
138#include "ector_renderer_generic_base.eo.c" 154#include "ector_renderer_generic_base.eo.c"
diff --git a/src/lib/ector/ector_renderer_generic_base.eo b/src/lib/ector/ector_renderer_generic_base.eo
index 7e0b0c2..80043d9 100644
--- a/src/lib/ector/ector_renderer_generic_base.eo
+++ b/src/lib/ector/ector_renderer_generic_base.eo
@@ -81,6 +81,11 @@ abstract Ector.Renderer.Generic.Base (Eo.Base)
81 q: Ector_Quality; 81 q: Ector_Quality;
82 } 82 }
83 } 83 }
84 @property crc {
85 get {
86 return: uint;
87 }
88 }
84 bounds_get { 89 bounds_get {
85 params { 90 params {
86 @out r: Eina.Rectangle; 91 @out r: Eina.Rectangle;
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 f2ca832..a7ce3ec 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -108,4 +108,20 @@ _ector_renderer_software_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj,
108 destroy_color_table(pd); 108 destroy_color_table(pd);
109} 109}
110 110
111static unsigned int
112_ector_renderer_software_gradient_linear_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd)
113{
114 unsigned int crc;
115
116 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
117 crc = ector_renderer_crc_get());
118
119 crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
120 if (pd->gd->colors_count)
121 crc = eina_crc((void*) pd->gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * pd->gd->colors_count, crc, EINA_FALSE);
122 crc = eina_crc((void*) pd->gld, sizeof (Ector_Renderer_Generic_Gradient_Linear_Data), crc, EINA_FALSE);
123
124 return crc;
125}
126
111#include "ector_renderer_software_gradient_linear.eo.c" 127#include "ector_renderer_software_gradient_linear.eo.c"
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
index 32f83df..d028548 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Software.Gradient_Linear (Ector.Renderer.Software.Base, Ect
6 implements { 6 implements {
7 Ector.Renderer.Generic.Base.prepare; 7 Ector.Renderer.Generic.Base.prepare;
8 Ector.Renderer.Generic.Base.draw; 8 Ector.Renderer.Generic.Base.draw;
9 Ector.Renderer.Generic.Base.crc.get;
9 Ector.Renderer.Software.Base.fill; 10 Ector.Renderer.Software.Base.fill;
10 Eo.Base.constructor; 11 Eo.Base.constructor;
11 Eo.Base.destructor; 12 Eo.Base.destructor;
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 5b63f95..74a8dab 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
@@ -116,4 +116,20 @@ _ector_renderer_software_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj,
116 destroy_color_table(pd); 116 destroy_color_table(pd);
117} 117}
118 118
119static unsigned int
120_ector_renderer_software_gradient_radial_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd)
121{
122 unsigned int crc;
123
124 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS,
125 crc = ector_renderer_crc_get());
126
127 crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
128 if (pd->gd->colors_count)
129 crc = eina_crc((void*) pd->gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * pd->gd->colors_count, crc, EINA_FALSE);
130 crc = eina_crc((void*) pd->gld, sizeof (Ector_Renderer_Generic_Gradient_Radial_Data), crc, EINA_FALSE);
131
132 return crc;
133}
134
119#include "ector_renderer_software_gradient_radial.eo.c" 135#include "ector_renderer_software_gradient_radial.eo.c"
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
index 85625f3..c94bfe4 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Software.Gradient_Radial (Ector.Renderer.Software.Base, Ect
6 implements { 6 implements {
7 Ector.Renderer.Generic.Base.prepare; 7 Ector.Renderer.Generic.Base.prepare;
8 Ector.Renderer.Generic.Base.draw; 8 Ector.Renderer.Generic.Base.draw;
9 Ector.Renderer.Generic.Base.crc.get;
9 Ector.Renderer.Software.Base.fill; 10 Ector.Renderer.Software.Base.fill;
10 Eo.Base.constructor; 11 Eo.Base.constructor;
11 Eo.Base.destructor; 12 Eo.Base.destructor;
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index c0cfe77..d659c92 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -726,4 +726,29 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
726} 726}
727 727
728 728
729unsigned int
730_ector_renderer_software_shape_ector_renderer_generic_base_crc_get(Eo *obj,
731 Ector_Renderer_Software_Shape_Data *pd)
732{
733 unsigned int crc;
734
735 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, crc = ector_renderer_crc_get());
736
737 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
738 crc = eina_crc((void*) &pd->shape->stroke.scale, sizeof (pd->shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered
739 crc = eina_crc((void*) &pd->shape->stroke.color, sizeof (pd->shape->stroke.color), crc, EINA_FALSE);
740 crc = eina_crc((void*) &pd->shape->stroke.cap, sizeof (pd->shape->stroke.cap), crc, EINA_FALSE);
741 crc = eina_crc((void*) &pd->shape->stroke.join, sizeof (pd->shape->stroke.join), crc, EINA_FALSE);
742
743 if (pd->shape->fill) crc = _renderer_crc_get(pd->shape->fill, crc);
744 if (pd->shape->stroke.fill) crc = _renderer_crc_get(pd->shape->stroke.fill, crc);
745 if (pd->shape->stroke.marker) crc = _renderer_crc_get(pd->shape->stroke.marker, crc);
746 if (pd->shape->stroke.dash_length)
747 {
748 crc = eina_crc((void*) pd->shape->stroke.dash, sizeof (Efl_Gfx_Dash) * pd->shape->stroke.dash_length, crc, EINA_FALSE);
749 }
750
751 return crc;
752}
753
729#include "ector_renderer_software_shape.eo.c" 754#include "ector_renderer_software_shape.eo.c"
diff --git a/src/lib/ector/software/ector_renderer_software_shape.eo b/src/lib/ector/software/ector_renderer_software_shape.eo
index 267ef7c..017a9cc 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.eo
+++ b/src/lib/ector/software/ector_renderer_software_shape.eo
@@ -6,6 +6,7 @@ class Ector.Renderer.Software.Shape (Ector.Renderer.Software.Base, Ector.Rendere
6 Ector.Renderer.Generic.Base.prepare; 6 Ector.Renderer.Generic.Base.prepare;
7 Ector.Renderer.Generic.Base.draw; 7 Ector.Renderer.Generic.Base.draw;
8 Ector.Renderer.Software.Base.fill; 8 Ector.Renderer.Software.Base.fill;
9 Ector.Renderer.Generic.Base.crc.get;
9 Efl.Gfx.Shape.path.set; 10 Efl.Gfx.Shape.path.set;
10 Eo.Base.constructor; 11 Eo.Base.constructor;
11 Eo.Base.destructor; 12 Eo.Base.destructor;