summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2017-08-29 16:24:20 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-29 16:24:23 -0700
commitd5346d4e24ded8d50e249fb8efa15daa93c73c16 (patch)
tree46cd5d8e1ddea10cda337c11fdd6312fd66cd83c
parentdcc2654673f7bdf83d9dba4ad94ff085a23bc89a (diff)
ector: cleanup grammar in comments
Reviewers: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D5132 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo.c4
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c8
-rw-r--r--src/lib/ector/gl/ector_gl_surface.c20
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c2
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c16
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c4
6 files changed, 27 insertions, 27 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo.c b/src/lib/ector/cairo/ector_renderer_cairo.c
index 59ec005..8657b5c 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo.c
@@ -65,13 +65,13 @@ static void (*cairo_rectangle)(cairo_t *cr, double x, double y, double width, do
65static void (*cairo_clip)(cairo_t *cr) = NULL; 65static void (*cairo_clip)(cairo_t *cr) = NULL;
66static void (*cairo_device_to_user)(cairo_t *cr, double *x, double *y) = NULL; 66static void (*cairo_device_to_user)(cairo_t *cr, double *x, double *y) = NULL;
67 67
68// This one is used by both gradient, so sharing it here. 68// This routine is shared for all gradient types to use
69void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, double offset, 69void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, double offset,
70 double red, double green, double blue, double alpha) = NULL; 70 double red, double green, double blue, double alpha) = NULL;
71 71
72static cairo_matrix_t identity; 72static cairo_matrix_t identity;
73 73
74// Cairo need unpremul color, so force unpremul here 74// Cairo needs unpremultiplied color, so force unpremul here
75void 75void
76_ector_renderer_cairo_ector_renderer_color_set(Eo *obj EINA_UNUSED, 76_ector_renderer_cairo_ector_renderer_color_set(Eo *obj EINA_UNUSED,
77 Ector_Renderer_Cairo_Data *pd, 77 Ector_Renderer_Cairo_Data *pd,
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index e0c9249..fb08cec 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -99,7 +99,7 @@ _ector_renderer_cairo_shape_ector_renderer_prepare(Eo *obj, Ector_Renderer_Cairo
99 if (pd->shape->stroke.marker) 99 if (pd->shape->stroke.marker)
100 ector_renderer_prepare(pd->shape->stroke.marker); 100 ector_renderer_prepare(pd->shape->stroke.marker);
101 101
102 // shouldn't that be moved to the cairo base object 102 // shouldn't this be moved to the cairo base object?
103 if (!pd->parent) 103 if (!pd->parent)
104 { 104 {
105 Ector_Renderer_Data *base; 105 Ector_Renderer_Data *base;
@@ -237,7 +237,7 @@ _ector_renderer_cairo_shape_ector_renderer_bounds_get(Eo *obj,
237{ 237{
238 Ector_Renderer_Cairo_Data *bd; 238 Ector_Renderer_Cairo_Data *bd;
239 239
240 // FIXME: It should be possible to actually ask cairo about that 240 // FIXME: It should be possible to ask cairo about this
241 efl_gfx_path_bounds_get(obj, r); 241 efl_gfx_path_bounds_get(obj, r);
242 242
243 bd = efl_data_scope_get(obj, ECTOR_RENDERER_CAIRO_CLASS); 243 bd = efl_data_scope_get(obj, ECTOR_RENDERER_CAIRO_CLASS);
@@ -295,8 +295,8 @@ _ector_renderer_cairo_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Cairo_
295{ 295{
296 Ector_Renderer_Data *base; 296 Ector_Renderer_Data *base;
297 297
298 //FIXME, As base class destructor can't call destructor of mixin class. 298 // FIXME: As base class destructor can't call destructor of mixin class.
299 // call explicit API to free shape data. 299 // Call explicit API to free shape data.
300 efl_gfx_path_reset(obj); 300 efl_gfx_path_reset(obj);
301 301
302 base = efl_data_scope_get(obj, ECTOR_RENDERER_CLASS); 302 base = efl_data_scope_get(obj, ECTOR_RENDERER_CLASS);
diff --git a/src/lib/ector/gl/ector_gl_surface.c b/src/lib/ector/gl/ector_gl_surface.c
index a0ec655..60fba18 100644
--- a/src/lib/ector/gl/ector_gl_surface.c
+++ b/src/lib/ector/gl/ector_gl_surface.c
@@ -76,8 +76,8 @@ _ector_gl_surface_push(Eo *obj,
76 76
77 prog = ector_gl_surface_shader_get(obj, flags); 77 prog = ector_gl_surface_shader_get(obj, flags);
78 78
79 // FIXME: Not using mapp/unmap buffer yet, nor any pipe 79 // FIXME: Not using map/unmap buffer yet, nor any pipe
80 // FIXME: Move some of the state change to surface drawing start ? 80 // FIXME: Move some of the state change to start of surface drawing?
81 GL.glUseProgram(prog); 81 GL.glUseProgram(prog);
82 GL.glDisable(GL_TEXTURE_2D); 82 GL.glDisable(GL_TEXTURE_2D);
83 GL.glDisable(GL_SCISSOR_TEST); 83 GL.glDisable(GL_SCISSOR_TEST);
@@ -95,7 +95,7 @@ _ector_gl_surface_state_define(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd, E
95 if (pd->op == op) return EINA_TRUE; 95 if (pd->op == op) return EINA_TRUE;
96 96
97 // FIXME: no pipe yet, so we can just change the mode right away 97 // FIXME: no pipe yet, so we can just change the mode right away
98 // Get & apply matrix transformation to 98 // Get & apply matrix transformation too
99 switch (op) 99 switch (op)
100 { 100 {
101 case EFL_GFX_RENDER_OP_BLEND: /**< default op: d = d*(1-sa) + s */ 101 case EFL_GFX_RENDER_OP_BLEND: /**< default op: d = d*(1-sa) + s */
@@ -103,7 +103,7 @@ _ector_gl_surface_state_define(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd, E
103 GL.glEnable(GL_BLEND); 103 GL.glEnable(GL_BLEND);
104 break; 104 break;
105 case EFL_GFX_RENDER_OP_COPY: /**< d = s */ 105 case EFL_GFX_RENDER_OP_COPY: /**< d = s */
106 // just disable blend mode. no need to set blend func 106 // Just disable blend mode. no need to set blend func
107 GL.glDisable(GL_BLEND); 107 GL.glDisable(GL_BLEND);
108 break; 108 break;
109 case EFL_GFX_RENDER_OP_LAST: 109 case EFL_GFX_RENDER_OP_LAST:
@@ -113,7 +113,7 @@ _ector_gl_surface_state_define(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd, E
113 113
114 pd->op = op; 114 pd->op = op;
115 115
116 //FIXME: we should not ignore clipping, but that can last for later 116 // FIXME: we should not ignore clipping, but that can last for later
117 (void) clips; 117 (void) clips;
118 118
119 return EINA_TRUE; 119 return EINA_TRUE;
@@ -170,7 +170,7 @@ _ector_gl_shader_textures_bind(Ector_Shader *p)
170 170
171 if (hastex) 171 if (hastex)
172 { 172 {
173 GL.glUseProgram(p->prg); // is this necessary?? 173 GL.glUseProgram(p->prg); // FIXME: is this necessary??
174 for (i = 0; textures[i].name; i++) 174 for (i = 0; textures[i].name; i++)
175 { 175 {
176 if (!textures[i].enabled) continue; 176 if (!textures[i].enabled) continue;
@@ -221,8 +221,8 @@ _ector_gl_shader_load(uint64_t flags)
221 221
222 prg = GL.glCreateProgram(); 222 prg = GL.glCreateProgram();
223 // TODO: invalid rendering error occurs when attempting to use a 223 // TODO: invalid rendering error occurs when attempting to use a
224 // glProgramBinary. in order to render correctly we should create a dummy 224 // glProgramBinary. In order to render correctly, we should create a
225 // vertex shader. 225 // dummy vertex shader.
226 vtx = GL.glCreateShader(GL_VERTEX_SHADER); 226 vtx = GL.glCreateShader(GL_VERTEX_SHADER);
227 GL.glAttachShader(prg, vtx); 227 GL.glAttachShader(prg, vtx);
228 frg = GL.glCreateShader(GL_FRAGMENT_SHADER); 228 frg = GL.glCreateShader(GL_FRAGMENT_SHADER);
@@ -306,10 +306,10 @@ _ector_gl_surface_shader_get(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd EINA
306 shd->prg = prg; 306 shd->prg = prg;
307 shd->flags = flags; 307 shd->flags = flags;
308 308
309 // Saving the shader in the memory cache 309 // Save the shader in the cache file
310 eina_hash_direct_add(shader_cache, &shd->flags, shd); 310 eina_hash_direct_add(shader_cache, &shd->flags, shd);
311 311
312 // Saving binary shader in the cache file. 312 // Save binary shader in the cache file
313 if (GL.glGetProgramBinary) 313 if (GL.glGetProgramBinary)
314 { 314 {
315 buf = eina_strbuf_new(); 315 buf = eina_strbuf_new();
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index e878860..1329a78 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -120,7 +120,7 @@ _ector_renderer_gl_shape_ector_renderer_crc_get(Eo *obj, Ector_Renderer_GL_Shape
120 120
121 crc = ector_renderer_crc_get(efl_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS)); 121 crc = ector_renderer_crc_get(efl_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
122 122
123 // This code should be shared with other implementation 123 // This code should be shared with the other implementation
124 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE); 124 crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
125 crc = eina_crc((void*) &pd->public_shape->stroke.scale, sizeof (pd->public_shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered 125 crc = eina_crc((void*) &pd->public_shape->stroke.scale, sizeof (pd->public_shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered
126 crc = eina_crc((void*) &pd->public_shape->stroke.color, sizeof (pd->public_shape->stroke.color), crc, EINA_FALSE); 126 crc = eina_crc((void*) &pd->public_shape->stroke.color, sizeof (pd->public_shape->stroke.color), crc, EINA_FALSE);
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index 31b230a..5bbdbf1 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -140,14 +140,14 @@ _outline_close_path(Outline *outline)
140 } 140 }
141 else 141 else
142 { 142 {
143 // first path 143 // First path
144 index = 0; 144 index = 0;
145 } 145 }
146 146
147 // make sure there is atleast one point in the current path 147 // Make sure there is at least one point in the current path
148 if (ft_outline->n_points == index) return EINA_FALSE; 148 if (ft_outline->n_points == index) return EINA_FALSE;
149 149
150 // close the path 150 // Close the path
151 _grow_outline_points(outline, 1); 151 _grow_outline_points(outline, 1);
152 ft_outline->points[ft_outline->n_points].x = ft_outline->points[index].x; 152 ft_outline->points[ft_outline->n_points].x = ft_outline->points[index].x;
153 ft_outline->points[ft_outline->n_points].y = ft_outline->points[index].y; 153 ft_outline->points[ft_outline->n_points].y = ft_outline->points[index].y;
@@ -262,7 +262,7 @@ _line_value_set(Line *l, double x1, double y1, double x2, double y2)
262} 262}
263 263
264// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm. 264// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm.
265// With alpha = 1, beta = 3/8, giving results with a largest error less 265// With alpha = 1, beta = 3/8, giving results with the largest error less
266// than 7% compared to the exact value. 266// than 7% compared to the exact value.
267static double 267static double
268_line_length(Line *l) 268_line_length(Line *l)
@@ -575,7 +575,7 @@ static Eina_Bool
575_ector_renderer_software_shape_ector_renderer_prepare(Eo *obj, 575_ector_renderer_software_shape_ector_renderer_prepare(Eo *obj,
576 Ector_Renderer_Software_Shape_Data *pd) 576 Ector_Renderer_Software_Shape_Data *pd)
577{ 577{
578 // FIXME: shouldn't that be part of the shape generic implementation ? 578 // FIXME: shouldn't this be part of the shape generic implementation?
579 if (pd->shape->fill) 579 if (pd->shape->fill)
580 ector_renderer_prepare(pd->shape->fill); 580 ector_renderer_prepare(pd->shape->fill);
581 if (pd->shape->stroke.fill) 581 if (pd->shape->stroke.fill)
@@ -583,7 +583,7 @@ _ector_renderer_software_shape_ector_renderer_prepare(Eo *obj,
583 if (pd->shape->stroke.marker) 583 if (pd->shape->stroke.marker)
584 ector_renderer_prepare(pd->shape->stroke.marker); 584 ector_renderer_prepare(pd->shape->stroke.marker);
585 585
586 // shouldn't that be moved to the software base object 586 // FIXME: shouldn't this be moved to the software base object?
587 if (!pd->surface) 587 if (!pd->surface)
588 pd->surface = efl_data_xref(pd->base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj); 588 pd->surface = efl_data_xref(pd->base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
589 589
@@ -709,8 +709,8 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
709static void 709static void
710_ector_renderer_software_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd) 710_ector_renderer_software_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
711{ 711{
712 //FIXME, As base class destructor can't call destructor of mixin class. 712 // FIXME: As base class, destructor can't call destructor of mixin class.
713 // call explicit API to free shape data. 713 // Call explicit API to free shape data.
714 efl_gfx_path_reset(obj); 714 efl_gfx_path_reset(obj);
715 715
716 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data); 716 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index 9c91856..02f24df 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -48,7 +48,7 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
48 int length, l; 48 int length, l;
49 const int pix_stride = data->raster_buffer->stride / 4; 49 const int pix_stride = data->raster_buffer->stride / 4;
50 50
51 //@TODO, Get the proper composition function using ,color, ECTOR_OP etc. 51 // FIXME: Get the proper composition function using ,color, ECTOR_OP etc.
52 if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient; 52 if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
53 if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient; 53 if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
54 54
@@ -253,7 +253,7 @@ _span_fill_clipPath(int span_count, const SW_FT_Span *spans, void *user_data)
253 Clip_Data clip = fill_data->clip; 253 Clip_Data clip = fill_data->clip;
254 SW_FT_Span *clipped; 254 SW_FT_Span *clipped;
255 255
256 //TODO take clip path offset into account. 256 // FIXME: Take clip path offset into account.
257 const SW_FT_Span *end = spans + span_count; 257 const SW_FT_Span *end = spans + span_count;
258 while (spans < end) 258 while (spans < end)
259 { 259 {