forked from enlightenment/efl
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>
This commit is contained in:
parent
dcc2654673
commit
d5346d4e24
|
@ -65,13 +65,13 @@ static void (*cairo_rectangle)(cairo_t *cr, double x, double y, double width, do
|
|||
static void (*cairo_clip)(cairo_t *cr) = NULL;
|
||||
static void (*cairo_device_to_user)(cairo_t *cr, double *x, double *y) = NULL;
|
||||
|
||||
// This one is used by both gradient, so sharing it here.
|
||||
// This routine is shared for all gradient types to use
|
||||
void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, double offset,
|
||||
double red, double green, double blue, double alpha) = NULL;
|
||||
|
||||
static cairo_matrix_t identity;
|
||||
|
||||
// Cairo need unpremul color, so force unpremul here
|
||||
// Cairo needs unpremultiplied color, so force unpremul here
|
||||
void
|
||||
_ector_renderer_cairo_ector_renderer_color_set(Eo *obj EINA_UNUSED,
|
||||
Ector_Renderer_Cairo_Data *pd,
|
||||
|
|
|
@ -99,7 +99,7 @@ _ector_renderer_cairo_shape_ector_renderer_prepare(Eo *obj, Ector_Renderer_Cairo
|
|||
if (pd->shape->stroke.marker)
|
||||
ector_renderer_prepare(pd->shape->stroke.marker);
|
||||
|
||||
// shouldn't that be moved to the cairo base object
|
||||
// shouldn't this be moved to the cairo base object?
|
||||
if (!pd->parent)
|
||||
{
|
||||
Ector_Renderer_Data *base;
|
||||
|
@ -237,7 +237,7 @@ _ector_renderer_cairo_shape_ector_renderer_bounds_get(Eo *obj,
|
|||
{
|
||||
Ector_Renderer_Cairo_Data *bd;
|
||||
|
||||
// FIXME: It should be possible to actually ask cairo about that
|
||||
// FIXME: It should be possible to ask cairo about this
|
||||
efl_gfx_path_bounds_get(obj, r);
|
||||
|
||||
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_
|
|||
{
|
||||
Ector_Renderer_Data *base;
|
||||
|
||||
//FIXME, As base class destructor can't call destructor of mixin class.
|
||||
// call explicit API to free shape data.
|
||||
// FIXME: As base class destructor can't call destructor of mixin class.
|
||||
// Call explicit API to free shape data.
|
||||
efl_gfx_path_reset(obj);
|
||||
|
||||
base = efl_data_scope_get(obj, ECTOR_RENDERER_CLASS);
|
||||
|
|
|
@ -76,8 +76,8 @@ _ector_gl_surface_push(Eo *obj,
|
|||
|
||||
prog = ector_gl_surface_shader_get(obj, flags);
|
||||
|
||||
// FIXME: Not using mapp/unmap buffer yet, nor any pipe
|
||||
// FIXME: Move some of the state change to surface drawing start ?
|
||||
// FIXME: Not using map/unmap buffer yet, nor any pipe
|
||||
// FIXME: Move some of the state change to start of surface drawing?
|
||||
GL.glUseProgram(prog);
|
||||
GL.glDisable(GL_TEXTURE_2D);
|
||||
GL.glDisable(GL_SCISSOR_TEST);
|
||||
|
@ -95,7 +95,7 @@ _ector_gl_surface_state_define(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd, E
|
|||
if (pd->op == op) return EINA_TRUE;
|
||||
|
||||
// FIXME: no pipe yet, so we can just change the mode right away
|
||||
// Get & apply matrix transformation to
|
||||
// Get & apply matrix transformation too
|
||||
switch (op)
|
||||
{
|
||||
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
|
|||
GL.glEnable(GL_BLEND);
|
||||
break;
|
||||
case EFL_GFX_RENDER_OP_COPY: /**< d = s */
|
||||
// just disable blend mode. no need to set blend func
|
||||
// Just disable blend mode. no need to set blend func
|
||||
GL.glDisable(GL_BLEND);
|
||||
break;
|
||||
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
|
|||
|
||||
pd->op = op;
|
||||
|
||||
//FIXME: we should not ignore clipping, but that can last for later
|
||||
// FIXME: we should not ignore clipping, but that can last for later
|
||||
(void) clips;
|
||||
|
||||
return EINA_TRUE;
|
||||
|
@ -170,7 +170,7 @@ _ector_gl_shader_textures_bind(Ector_Shader *p)
|
|||
|
||||
if (hastex)
|
||||
{
|
||||
GL.glUseProgram(p->prg); // is this necessary??
|
||||
GL.glUseProgram(p->prg); // FIXME: is this necessary??
|
||||
for (i = 0; textures[i].name; i++)
|
||||
{
|
||||
if (!textures[i].enabled) continue;
|
||||
|
@ -221,8 +221,8 @@ _ector_gl_shader_load(uint64_t flags)
|
|||
|
||||
prg = GL.glCreateProgram();
|
||||
// TODO: invalid rendering error occurs when attempting to use a
|
||||
// glProgramBinary. in order to render correctly we should create a dummy
|
||||
// vertex shader.
|
||||
// glProgramBinary. In order to render correctly, we should create a
|
||||
// dummy vertex shader.
|
||||
vtx = GL.glCreateShader(GL_VERTEX_SHADER);
|
||||
GL.glAttachShader(prg, vtx);
|
||||
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
|
|||
shd->prg = prg;
|
||||
shd->flags = flags;
|
||||
|
||||
// Saving the shader in the memory cache
|
||||
// Save the shader in the cache file
|
||||
eina_hash_direct_add(shader_cache, &shd->flags, shd);
|
||||
|
||||
// Saving binary shader in the cache file.
|
||||
// Save binary shader in the cache file
|
||||
if (GL.glGetProgramBinary)
|
||||
{
|
||||
buf = eina_strbuf_new();
|
||||
|
|
|
@ -120,7 +120,7 @@ _ector_renderer_gl_shape_ector_renderer_crc_get(Eo *obj, Ector_Renderer_GL_Shape
|
|||
|
||||
crc = ector_renderer_crc_get(efl_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
|
||||
|
||||
// This code should be shared with other implementation
|
||||
// This code should be shared with the other implementation
|
||||
crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
|
||||
crc = eina_crc((void*) &pd->public_shape->stroke.scale, sizeof (pd->public_shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered
|
||||
crc = eina_crc((void*) &pd->public_shape->stroke.color, sizeof (pd->public_shape->stroke.color), crc, EINA_FALSE);
|
||||
|
|
|
@ -140,14 +140,14 @@ _outline_close_path(Outline *outline)
|
|||
}
|
||||
else
|
||||
{
|
||||
// first path
|
||||
// First path
|
||||
index = 0;
|
||||
}
|
||||
|
||||
// make sure there is atleast one point in the current path
|
||||
// Make sure there is at least one point in the current path
|
||||
if (ft_outline->n_points == index) return EINA_FALSE;
|
||||
|
||||
// close the path
|
||||
// Close the path
|
||||
_grow_outline_points(outline, 1);
|
||||
ft_outline->points[ft_outline->n_points].x = ft_outline->points[index].x;
|
||||
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)
|
|||
}
|
||||
|
||||
// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm.
|
||||
// With alpha = 1, beta = 3/8, giving results with a largest error less
|
||||
// With alpha = 1, beta = 3/8, giving results with the largest error less
|
||||
// than 7% compared to the exact value.
|
||||
static double
|
||||
_line_length(Line *l)
|
||||
|
@ -575,7 +575,7 @@ static Eina_Bool
|
|||
_ector_renderer_software_shape_ector_renderer_prepare(Eo *obj,
|
||||
Ector_Renderer_Software_Shape_Data *pd)
|
||||
{
|
||||
// FIXME: shouldn't that be part of the shape generic implementation ?
|
||||
// FIXME: shouldn't this be part of the shape generic implementation?
|
||||
if (pd->shape->fill)
|
||||
ector_renderer_prepare(pd->shape->fill);
|
||||
if (pd->shape->stroke.fill)
|
||||
|
@ -583,7 +583,7 @@ _ector_renderer_software_shape_ector_renderer_prepare(Eo *obj,
|
|||
if (pd->shape->stroke.marker)
|
||||
ector_renderer_prepare(pd->shape->stroke.marker);
|
||||
|
||||
// shouldn't that be moved to the software base object
|
||||
// FIXME: shouldn't this be moved to the software base object?
|
||||
if (!pd->surface)
|
||||
pd->surface = efl_data_xref(pd->base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
|
||||
|
||||
|
@ -709,8 +709,8 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
|
|||
static void
|
||||
_ector_renderer_software_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
|
||||
{
|
||||
//FIXME, As base class destructor can't call destructor of mixin class.
|
||||
// call explicit API to free shape data.
|
||||
// FIXME: As base class, destructor can't call destructor of mixin class.
|
||||
// Call explicit API to free shape data.
|
||||
efl_gfx_path_reset(obj);
|
||||
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
|
|
|
@ -48,7 +48,7 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
|
|||
int length, l;
|
||||
const int pix_stride = data->raster_buffer->stride / 4;
|
||||
|
||||
//@TODO, Get the proper composition function using ,color, ECTOR_OP etc.
|
||||
// FIXME: Get the proper composition function using ,color, ECTOR_OP etc.
|
||||
if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
|
||||
if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
|
||||
|
||||
|
@ -253,7 +253,7 @@ _span_fill_clipPath(int span_count, const SW_FT_Span *spans, void *user_data)
|
|||
Clip_Data clip = fill_data->clip;
|
||||
SW_FT_Span *clipped;
|
||||
|
||||
//TODO take clip path offset into account.
|
||||
// FIXME: Take clip path offset into account.
|
||||
const SW_FT_Span *end = spans + span_count;
|
||||
while (spans < end)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue