aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ector/software/ector_renderer_software_gradient_linear.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/software/ector_renderer_software_gradient_linear.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/software/ector_renderer_software_gradient_linear.c')
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c16
1 files changed, 16 insertions, 0 deletions
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 f2ca832cdc..a7ce3ece12 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,
destroy_color_table(pd);
}
+static unsigned int
+_ector_renderer_software_gradient_linear_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd)
+{
+ unsigned int crc;
+
+ eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
+ crc = ector_renderer_crc_get());
+
+ crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
+ if (pd->gd->colors_count)
+ crc = eina_crc((void*) pd->gd->colors, sizeof (Efl_Gfx_Gradient_Stop) * pd->gd->colors_count, crc, EINA_FALSE);
+ crc = eina_crc((void*) pd->gld, sizeof (Ector_Renderer_Generic_Gradient_Linear_Data), crc, EINA_FALSE);
+
+ return crc;
+}
+
#include "ector_renderer_software_gradient_linear.eo.c"