diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-12-03 16:19:27 +0900 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-12-03 11:31:08 -0500 |
commit | 9be52172cb60a04d15ea16b017d900b6ac39eeae (patch) | |
tree | a11c1d5071df9702e1cdd9a32e52c6bb4c72fa0e | |
parent | 26f6ef7ae9a112b8a440180ad6225bcc136f6f8e (diff) | |
download | efl-9be52172cb60a04d15ea16b017d900b6ac39eeae.tar.gz |
Ector: Kill compilation warnings
Remove unimplemented function (no test case yet).
Convert #warning into comments.
-rw-r--r-- | src/lib/ector/software/ector_software_gradient.c | 2 | ||||
-rw-r--r-- | src/lib/ector/software/ector_software_rasterizer.c | 26 | ||||
-rw-r--r-- | src/static_libs/draw/draw.h | 8 | ||||
-rw-r--r-- | src/static_libs/draw/draw_main.c | 7 | ||||
-rw-r--r-- | src/static_libs/draw/draw_main_sse2.c | 4 |
5 files changed, 19 insertions, 28 deletions
diff --git a/src/lib/ector/software/ector_software_gradient.c b/src/lib/ector/software/ector_software_gradient.c index bbe675ea0b..f840f73c2c 100644 --- a/src/lib/ector/software/ector_software_gradient.c +++ b/src/lib/ector/software/ector_software_gradient.c @@ -329,7 +329,7 @@ _generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_c t = func((fpos - curr->offset) * delta); dist = (int)(256 * t); idist = 256 - dist; - color_table[pos] = INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist); + color_table[pos] = draw_interpolate_256(current_color, idist, next_color, dist); ++pos; fpos += incr; } diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c index 8224c6c824..7282144c3b 100644 --- a/src/lib/ector/software/ector_software_rasterizer.c +++ b/src/lib/ector/software/ector_software_rasterizer.c @@ -77,19 +77,6 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data) } static void -_blend_image_gry8(int count, const SW_FT_Span *spans, void *user_data) -{ - Span_Data *data = user_data; - -#warning Need drawhelper here (no alpha support yet) - - while (count--) - { - spans++; - } -} - -static void _blend_image_argb(int count, const SW_FT_Span *spans, void *user_data) { Span_Data *data = user_data; @@ -99,11 +86,13 @@ _blend_image_argb(int count, const SW_FT_Span *spans, void *user_data) unsigned int l, length, sy = 0; const int pix_stride = data->raster_buffer->stride / 4; -#warning FIXME: Image scaling, anyone? -#warning FIXME: Optimize eo call with early call resolution + /* FIXME: + * optimize eo call + * implement image scaling + * tile and repeat image properly + */ comp_func = efl_draw_func_span_get(data->op, data->mul_col, EINA_TRUE); - buffer = data->raster_buffer->pixels.u32 + ((pix_stride * data->offy) + data->offx); while (count--) @@ -330,10 +319,7 @@ _adjust_span_fill_methods(Span_Data *spdata) spdata->unclipped_blend = &_blend_gradient; break; case Image: - if (spdata->buffer->generic->cspace == EFL_GFX_COLORSPACE_GRY8) - spdata->unclipped_blend = &_blend_image_gry8; - else - spdata->unclipped_blend = &_blend_image_argb; + spdata->unclipped_blend = &_blend_image_argb; break; } diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h index c2f2370596..ae00cc26fd 100644 --- a/src/static_libs/draw/draw.h +++ b/src/static_libs/draw/draw.h @@ -13,8 +13,8 @@ typedef void (*Alpha_Gfx_Func) (uint8_t *src, uint8_t *dst, int len); int efl_draw_init(void); -RGBA_Comp_Func_Solid efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint color); RGBA_Comp_Func efl_draw_func_span_get(Efl_Gfx_Render_Op op, uint color, Eina_Bool src_alpha); +RGBA_Comp_Func_Solid efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint color); Alpha_Gfx_Func efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask); @@ -57,8 +57,12 @@ Alpha_Gfx_Func efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask) ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff0000) >> 16) & 0xff00) + \ (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) +#define DRAW_MUL_256(a, c) \ + ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \ + (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) ) + static inline uint -INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) +draw_interpolate_256(uint x, uint a, uint y, uint b) { uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; t >>= 8; diff --git a/src/static_libs/draw/draw_main.c b/src/static_libs/draw/draw_main.c index 5d67602e07..8db3d20885 100644 --- a/src/static_libs/draw/draw_main.c +++ b/src/static_libs/draw/draw_main.c @@ -106,7 +106,7 @@ _comp_func_source(uint *dest, const uint *src, int length, uint color, uint cons { ialpha = 255 - const_alpha; for (i = 0; i < length; ++i) - dest[i] = INTERPOLATE_PIXEL_256(src[i], const_alpha, dest[i], ialpha); + dest[i] = draw_interpolate_256(src[i], const_alpha, dest[i], ialpha); } } else @@ -122,7 +122,7 @@ _comp_func_source(uint *dest, const uint *src, int length, uint color, uint cons for (i = 0; i < length; ++i) { src_color = DRAW_MUL4_SYM(src[i], color); - dest[i] = INTERPOLATE_PIXEL_256(src_color, const_alpha, dest[i], ialpha); + dest[i] = draw_interpolate_256(src_color, const_alpha, dest[i], ialpha); } } } @@ -149,7 +149,8 @@ efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint color) return func_for_mode_solid[op]; } -RGBA_Comp_Func efl_draw_func_span_get(Efl_Gfx_Render_Op op, uint color, Eina_Bool src_alpha) +RGBA_Comp_Func +efl_draw_func_span_get(Efl_Gfx_Render_Op op, uint color, Eina_Bool src_alpha) { if (((color & 0xff000000) == 0xff000000) && !src_alpha) { diff --git a/src/static_libs/draw/draw_main_sse2.c b/src/static_libs/draw/draw_main_sse2.c index 1d8b1cb833..c07234a4f8 100644 --- a/src/static_libs/draw/draw_main_sse2.c +++ b/src/static_libs/draw/draw_main_sse2.c @@ -220,7 +220,7 @@ comp_func_source_sse2(uint *dest, const uint *src, int length, uint color, uint LOOP_ALIGNED_U1_A4(dest, length, { /* UOP */ - *dest = INTERPOLATE_PIXEL_256(*src, const_alpha, *dest, ialpha); + *dest = draw_interpolate_256(*src, const_alpha, *dest, ialpha); dest++; src++; length--; }, { /* A4OP */ @@ -257,7 +257,7 @@ comp_func_source_sse2(uint *dest, const uint *src, int length, uint color, uint LOOP_ALIGNED_U1_A4(dest, length, { /* UOP */ src_color = DRAW_MUL4_SYM(*src, color); - *dest = INTERPOLATE_PIXEL_256(src_color, const_alpha, *dest, ialpha); + *dest = draw_interpolate_256(src_color, const_alpha, *dest, ialpha); dest++; src++; length--; }, { /* A4OP */ |