jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=33cd26a4b24a5b04fcd27d9050a0e6c3ff09b331

commit 33cd26a4b24a5b04fcd27d9050a0e6c3ff09b331
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Thu Dec 3 14:41:06 2015 +0900

    Ector: Another minor code cleanup
    
    Remove DATA8, DATA16, DATA32
    Remove empty data structure
    Remove unnecessary typedef
---
 src/lib/ector/ector_private.h                      |  9 ---------
 src/lib/ector/software/Ector_Software.h            |  9 ---------
 .../ector/software/ector_renderer_software_base.eo |  1 +
 src/lib/ector/software/ector_software_buffer.c     |  2 +-
 src/lib/ector/software/ector_software_private.h    | 23 ++++------------------
 src/lib/ector/software/ector_software_rasterizer.c |  6 +++---
 6 files changed, 9 insertions(+), 41 deletions(-)

diff --git a/src/lib/ector/ector_private.h b/src/lib/ector/ector_private.h
index f212a5f..598559e 100644
--- a/src/lib/ector/ector_private.h
+++ b/src/lib/ector/ector_private.h
@@ -40,15 +40,6 @@ extern int _ector_log_dom_global;
 
 /* The following macro are internal to Ector only at this stage */
 
-typedef unsigned char DATA8;
-typedef unsigned short DATA16;
-
-#define RGB_JOIN(r,g,b) \
-  (((r) << 16) + ((g) << 8) + (b))
-
-#define ARGB_JOIN(a,r,g,b) \
-  (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
-
 static inline Eo *
 _eo_refplace(Eo **d, const Eo *s)
 {
diff --git a/src/lib/ector/software/Ector_Software.h 
b/src/lib/ector/software/Ector_Software.h
index 430315a..bb134c6 100644
--- a/src/lib/ector/software/Ector_Software.h
+++ b/src/lib/ector/software/Ector_Software.h
@@ -3,15 +3,6 @@
 
 #include <Ector.h>
 
-#ifndef _ECTOR_SOFTWARE_SURFACE_EO_CLASS_TYPE
-#define _ECTOR_SOFTWARE_SURFACE_EO_CLASS_TYPE
-
-typedef Eo Ector_Software_Surface;
-
-#endif
-
-typedef struct _Software_Rasterizer Software_Rasterizer;
-
 #include "software/ector_software_surface.eo.h"
 #include "software/ector_software_buffer.eo.h"
 #include "software/ector_software_buffer_base.eo.h"
diff --git a/src/lib/ector/software/ector_renderer_software_base.eo 
b/src/lib/ector/software/ector_renderer_software_base.eo
index 6055be5..19061e3 100644
--- a/src/lib/ector/software/ector_renderer_software_base.eo
+++ b/src/lib/ector/software/ector_renderer_software_base.eo
@@ -1,6 +1,7 @@
 class Ector.Renderer.Software.Base (Ector.Renderer.Generic.Base)
 {
    legacy_prefix: null;
+   data: null;
    methods {
       fill {
          return: bool;
diff --git a/src/lib/ector/software/ector_software_buffer.c 
b/src/lib/ector/software/ector_software_buffer.c
index 1f754aa..cd558ec 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -46,7 +46,7 @@ _pixels_gry8_to_argb_convert(uint32_t *dst, const uint8_t 
*src, int len)
    for (k = 0; k < len; k++)
      {
         uint8_t s = *src++;
-        *dst++ = ARGB_JOIN(s, s, s, s);
+        *dst++ = DRAW_ARGB_JOIN(s, s, s, s);
      }
 }
 
diff --git a/src/lib/ector/software/ector_software_private.h 
b/src/lib/ector/software/ector_software_private.h
index fadadba..5a05aa5 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -6,22 +6,7 @@
 #include "sw_ft_stroker.h"
 #include "../ector_private.h"
 
-#ifndef DATA32
-typedef unsigned int DATA32;
-#endif
-
-#ifndef uint
-typedef unsigned int uint;
-#endif
-
 typedef struct _Ector_Software_Surface_Data Ector_Software_Surface_Data;
-typedef struct _Ector_Renderer_Software_Base_Data 
Ector_Renderer_Software_Base_Data;
-
-#define CHECK_SOFTWARE(Parent) (!(Parent && Parent->software))
-
-struct _Ector_Renderer_Software_Base_Data
-{
-};
 
 // Gradient related structure
 typedef struct _Software_Gradient_Linear_Data
@@ -90,16 +75,16 @@ typedef struct _Span_Data
    Eina_Matrix3     inv;
    Span_Data_Type   type;
    Eina_Bool        fast_matrix ;
-   DATA32           mul_col;
+   uint32_t         mul_col;
    Efl_Gfx_Render_Op        op;
    union {
-      DATA32 color;
+      uint32_t color;
       Ector_Renderer_Software_Gradient_Data *gradient;
       Ector_Software_Buffer_Base_Data *buffer;
    };
 } Span_Data;
 
-struct _Software_Rasterizer
+typedef struct _Software_Rasterizer
 {
    SW_FT_Raster     raster;
    SW_FT_Stroker    stroker;
@@ -108,7 +93,7 @@ struct _Software_Rasterizer
    Eina_Matrix3    *transform;
    Eina_Rectangle   system_clip;
 
-};
+} Software_Rasterizer;
 
 struct _Ector_Software_Surface_Data
 {
diff --git a/src/lib/ector/software/ector_software_rasterizer.c 
b/src/lib/ector/software/ector_software_rasterizer.c
index 5990792..8224c6c 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -94,8 +94,8 @@ _blend_image_argb(int count, const SW_FT_Span *spans, void 
*user_data)
 {
    Span_Data *data = user_data;
    RGBA_Comp_Func comp_func;
-   DATA32 *buffer, *target;
-   DATA8 *src8;
+   uint32_t *buffer, *target;
+   uint8_t *src8;
    unsigned int l, length, sy = 0;
    const int pix_stride = data->raster_buffer->stride / 4;
 
@@ -114,7 +114,7 @@ _blend_image_argb(int count, const SW_FT_Span *spans, void 
*user_data)
           {
              l = MIN(length, data->buffer->generic->w);
              eo_do(data->buffer->generic->eo, src8 = ector_buffer_span_get(0, 
sy, l, EFL_GFX_COLORSPACE_ARGB8888, NULL));
-             comp_func(target, (DATA32 *) src8, l, data->mul_col, 
spans->coverage);
+             comp_func(target, (uint32_t *) src8, l, data->mul_col, 
spans->coverage);
              eo_do(data->buffer->generic->eo, ector_buffer_span_free(src8));
              target += l;
              length -= l;

-- 


Reply via email to