summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-03 14:41:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-12-03 18:42:50 +0900
commit33cd26a4b24a5b04fcd27d9050a0e6c3ff09b331 (patch)
treea7961a19cda8d76d744bd5a1f0f28524ebb43b1d /src
parent615b2442b76eeeeacc3e386ca5fd322047009761 (diff)
Ector: Another minor code cleanup
Remove DATA8, DATA16, DATA32 Remove empty data structure Remove unnecessary typedef
Diffstat (limited to 'src')
-rw-r--r--src/lib/ector/ector_private.h9
-rw-r--r--src/lib/ector/software/Ector_Software.h9
-rw-r--r--src/lib/ector/software/ector_renderer_software_base.eo1
-rw-r--r--src/lib/ector/software/ector_software_buffer.c2
-rw-r--r--src/lib/ector/software/ector_software_private.h23
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c6
6 files changed, 9 insertions, 41 deletions
diff --git a/src/lib/ector/ector_private.h b/src/lib/ector/ector_private.h
index f212a5f0ec..598559ee92 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;
40 40
41/* The following macro are internal to Ector only at this stage */ 41/* The following macro are internal to Ector only at this stage */
42 42
43typedef unsigned char DATA8;
44typedef unsigned short DATA16;
45
46#define RGB_JOIN(r,g,b) \
47 (((r) << 16) + ((g) << 8) + (b))
48
49#define ARGB_JOIN(a,r,g,b) \
50 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
51
52static inline Eo * 43static inline Eo *
53_eo_refplace(Eo **d, const Eo *s) 44_eo_refplace(Eo **d, const Eo *s)
54{ 45{
diff --git a/src/lib/ector/software/Ector_Software.h b/src/lib/ector/software/Ector_Software.h
index 430315a57e..bb134c6850 100644
--- a/src/lib/ector/software/Ector_Software.h
+++ b/src/lib/ector/software/Ector_Software.h
@@ -3,15 +3,6 @@
3 3
4#include <Ector.h> 4#include <Ector.h>
5 5
6#ifndef _ECTOR_SOFTWARE_SURFACE_EO_CLASS_TYPE
7#define _ECTOR_SOFTWARE_SURFACE_EO_CLASS_TYPE
8
9typedef Eo Ector_Software_Surface;
10
11#endif
12
13typedef struct _Software_Rasterizer Software_Rasterizer;
14
15#include "software/ector_software_surface.eo.h" 6#include "software/ector_software_surface.eo.h"
16#include "software/ector_software_buffer.eo.h" 7#include "software/ector_software_buffer.eo.h"
17#include "software/ector_software_buffer_base.eo.h" 8#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 6055be585c..19061e3fa7 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 @@
1class Ector.Renderer.Software.Base (Ector.Renderer.Generic.Base) 1class Ector.Renderer.Software.Base (Ector.Renderer.Generic.Base)
2{ 2{
3 legacy_prefix: null; 3 legacy_prefix: null;
4 data: null;
4 methods { 5 methods {
5 fill { 6 fill {
6 return: bool; 7 return: bool;
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index 1f754aaeb6..cd558ecd4e 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)
46 for (k = 0; k < len; k++) 46 for (k = 0; k < len; k++)
47 { 47 {
48 uint8_t s = *src++; 48 uint8_t s = *src++;
49 *dst++ = ARGB_JOIN(s, s, s, s); 49 *dst++ = DRAW_ARGB_JOIN(s, s, s, s);
50 } 50 }
51} 51}
52 52
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index fadadba798..5a05aa51a9 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -6,22 +6,7 @@
6#include "sw_ft_stroker.h" 6#include "sw_ft_stroker.h"
7#include "../ector_private.h" 7#include "../ector_private.h"
8 8
9#ifndef DATA32
10typedef unsigned int DATA32;
11#endif
12
13#ifndef uint
14typedef unsigned int uint;
15#endif
16
17typedef struct _Ector_Software_Surface_Data Ector_Software_Surface_Data; 9typedef struct _Ector_Software_Surface_Data Ector_Software_Surface_Data;
18typedef struct _Ector_Renderer_Software_Base_Data Ector_Renderer_Software_Base_Data;
19
20#define CHECK_SOFTWARE(Parent) (!(Parent && Parent->software))
21
22struct _Ector_Renderer_Software_Base_Data
23{
24};
25 10
26// Gradient related structure 11// Gradient related structure
27typedef struct _Software_Gradient_Linear_Data 12typedef struct _Software_Gradient_Linear_Data
@@ -90,16 +75,16 @@ typedef struct _Span_Data
90 Eina_Matrix3 inv; 75 Eina_Matrix3 inv;
91 Span_Data_Type type; 76 Span_Data_Type type;
92 Eina_Bool fast_matrix ; 77 Eina_Bool fast_matrix ;
93 DATA32 mul_col; 78 uint32_t mul_col;
94 Efl_Gfx_Render_Op op; 79 Efl_Gfx_Render_Op op;
95 union { 80 union {
96 DATA32 color; 81 uint32_t color;
97 Ector_Renderer_Software_Gradient_Data *gradient; 82 Ector_Renderer_Software_Gradient_Data *gradient;
98 Ector_Software_Buffer_Base_Data *buffer; 83 Ector_Software_Buffer_Base_Data *buffer;
99 }; 84 };
100} Span_Data; 85} Span_Data;
101 86
102struct _Software_Rasterizer 87typedef struct _Software_Rasterizer
103{ 88{
104 SW_FT_Raster raster; 89 SW_FT_Raster raster;
105 SW_FT_Stroker stroker; 90 SW_FT_Stroker stroker;
@@ -108,7 +93,7 @@ struct _Software_Rasterizer
108 Eina_Matrix3 *transform; 93 Eina_Matrix3 *transform;
109 Eina_Rectangle system_clip; 94 Eina_Rectangle system_clip;
110 95
111}; 96} Software_Rasterizer;
112 97
113struct _Ector_Software_Surface_Data 98struct _Ector_Software_Surface_Data
114{ 99{
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index 59907921a0..8224c6c824 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)
94{ 94{
95 Span_Data *data = user_data; 95 Span_Data *data = user_data;
96 RGBA_Comp_Func comp_func; 96 RGBA_Comp_Func comp_func;
97 DATA32 *buffer, *target; 97 uint32_t *buffer, *target;
98 DATA8 *src8; 98 uint8_t *src8;
99 unsigned int l, length, sy = 0; 99 unsigned int l, length, sy = 0;
100 const int pix_stride = data->raster_buffer->stride / 4; 100 const int pix_stride = data->raster_buffer->stride / 4;
101 101
@@ -114,7 +114,7 @@ _blend_image_argb(int count, const SW_FT_Span *spans, void *user_data)
114 { 114 {
115 l = MIN(length, data->buffer->generic->w); 115 l = MIN(length, data->buffer->generic->w);
116 eo_do(data->buffer->generic->eo, src8 = ector_buffer_span_get(0, sy, l, EFL_GFX_COLORSPACE_ARGB8888, NULL)); 116 eo_do(data->buffer->generic->eo, src8 = ector_buffer_span_get(0, sy, l, EFL_GFX_COLORSPACE_ARGB8888, NULL));
117 comp_func(target, (DATA32 *) src8, l, data->mul_col, spans->coverage); 117 comp_func(target, (uint32_t *) src8, l, data->mul_col, spans->coverage);
118 eo_do(data->buffer->generic->eo, ector_buffer_span_free(src8)); 118 eo_do(data->buffer->generic->eo, ector_buffer_span_free(src8));
119 target += l; 119 target += l;
120 length -= l; 120 length -= l;