summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_renderer_gl_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/gl/ector_renderer_gl_shape.c')
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index b092712..59aaadf 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -39,9 +39,9 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_Rend
39 39
40 if (pd->vertex) return EINA_TRUE; 40 if (pd->vertex) return EINA_TRUE;
41 41
42 eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, r = ector_renderer_prepare()); 42 r = ector_renderer_prepare(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
43 43
44 eo_do(obj, ector_renderer_bounds_get(&bounding_box)); 44 ector_renderer_bounds_get(obj, &bounding_box);
45 45
46 pd->vertex = malloc(sizeof (GLshort) * 6 * 3); 46 pd->vertex = malloc(sizeof (GLshort) * 6 * 3);
47 47
@@ -74,7 +74,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rendere
74{ 74{
75 uint64_t flags = 0; 75 uint64_t flags = 0;
76 76
77 eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, ector_renderer_draw(op, clips, mul_col)); 77 ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS), op, clips, mul_col);
78 78
79 // FIXME: adjust flags content correctly 79 // FIXME: adjust flags content correctly
80 // FIXME: should not ignore clips (idea is that the geometry will be cliped here and the 80 // FIXME: should not ignore clips (idea is that the geometry will be cliped here and the
@@ -82,12 +82,11 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rendere
82 82
83 if (pd->shape->fill) 83 if (pd->shape->fill)
84 { 84 {
85 eo_do(pd->shape->fill, ector_renderer_gl_base_fill(flags, pd->vertex, 6, mul_col)); 85 ector_renderer_gl_base_fill(pd->shape->fill, flags, pd->vertex, 6, mul_col);
86 } 86 }
87 else 87 else
88 { 88 {
89 eo_do(pd->base->surface, 89 ector_gl_surface_push(pd->base->surface, flags, pd->vertex, 6, mul_col);
90 ector_gl_surface_push(flags, pd->vertex, 6, mul_col));
91 } 90 }
92 91
93 return EINA_TRUE; 92 return EINA_TRUE;
@@ -110,7 +109,7 @@ _ector_renderer_gl_shape_ector_renderer_gl_base_fill(Eo *obj EINA_UNUSED,
110static void 109static void
111_ector_renderer_gl_shape_ector_renderer_generic_base_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rectangle *r) 110_ector_renderer_gl_shape_ector_renderer_generic_base_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rectangle *r)
112{ 111{
113 eo_do(obj, efl_gfx_shape_bounds_get(r)); 112 efl_gfx_shape_bounds_get(obj, r);
114 113
115 r->x += pd->base->origin.x; 114 r->x += pd->base->origin.x;
116 r->y += pd->base->origin.y; 115 r->y += pd->base->origin.y;
@@ -121,8 +120,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Rend
121{ 120{
122 unsigned int crc; 121 unsigned int crc;
123 122
124 eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, 123 crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
125 crc = ector_renderer_crc_get());
126 124
127 // This code should be shared with other implementation 125 // This code should be shared with other implementation
128 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE); 126 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
@@ -145,7 +143,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Rend
145static Eo_Base * 143static Eo_Base *
146_ector_renderer_gl_shape_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Shape_Data *pd) 144_ector_renderer_gl_shape_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Shape_Data *pd)
147{ 145{
148 eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, obj = eo_constructor()); 146 obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
149 147
150 if (!obj) return NULL; 148 if (!obj) return NULL;
151 149
@@ -153,8 +151,7 @@ _ector_renderer_gl_shape_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Shape_Da
153 pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj); 151 pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
154 pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj); 152 pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
155 153
156 eo_do(obj, 154 eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
157 eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_gl_shape_path_changed, pd));
158 155
159 return obj; 156 return obj;
160} 157}