Ector: Kill compilation warnings
authorJean-Philippe Andre <jp.andre@samsung.com>
Thu, 3 Dec 2015 07:19:27 +0000 (16:19 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Thu, 3 Dec 2015 09:42:50 +0000 (18:42 +0900)
Remove unimplemented function (no test case yet).
Convert #warning into comments.

src/lib/ector/software/ector_software_gradient.c
src/lib/ector/software/ector_software_rasterizer.c
src/static_libs/draw/draw.h
src/static_libs/draw/draw_main.c
src/static_libs/draw/draw_main_sse2.c

index bbe675e..f840f73 100644 (file)
@@ -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;
           }
index 8224c6c..7282144 100644 (file)
@@ -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;
      }
 
index c2f2370..ae00cc2 100644 (file)
@@ -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;
index 5d67602..8db3d20 100644 (file)
@@ -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)
      {
index 1d8b1cb..c07234a 100644 (file)
@@ -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 */