aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-09-17 07:55:52 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-09-21 22:50:34 +0200
commit641699738216f20bc432ab527ccebea6264f523c (patch)
tree368387affcfb3d5247fd0e8ea078a39bfdac37e3 /src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
parentector: fix cairo backend to properly multiply gradient color. (diff)
downloadefl-641699738216f20bc432ab527ccebea6264f523c.tar.gz
ector: make it possible to have an unique id per Ector_Renderer.
This is going to be used by an Eina_Hash to deduplicate the number of Ector_Renderer.
Diffstat (limited to 'src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c')
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c22
1 files changed, 22 insertions, 0 deletions
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 508632b073..0857e2542f 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,
efl_gfx_gradient_stop_set(colors, length));
}
+static unsigned int
+_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd EINA_UNUSED)
+{
+ Ector_Renderer_Generic_Gradient_Radial_Data *grd;
+ Ector_Renderer_Generic_Gradient_Data *gd;
+ unsigned int crc;
+
+ eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
+ crc = ector_renderer_crc_get());
+
+ grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
+ gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
+ if (!grd || !gd) return crc;
+
+ crc = eina_crc((void*) gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
+ if (gd->colors_count)
+ crc = eina_crc((void*) gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * gd->colors_count, crc, EINA_FALSE);
+ crc = eina_crc((void*) grd, sizeof (Ector_Renderer_Generic_Gradient_Radial_Data), crc, EINA_FALSE);
+
+ return crc;
+}
+
#include "ector_renderer_cairo_gradient_radial.eo.c"