aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-03 20:15:17 +0900
committerChris Michael <cp.michael@samsung.com>2015-12-03 11:31:08 -0500
commitd61189fa4b37dc19a3f7317a6767e5673bf0e17a (patch)
tree06da31e91801dd99c679780d71601c2975d2ebc7
parentedje_entry: Fix crash on selection (diff)
downloadefl-d61189fa4b37dc19a3f7317a6767e5673bf0e17a.tar.gz
Ector: use uint32_t instead of uint
This fixes the build for Windows. Thanks @vtorri for the report. I'm not using "unsigned int" as uint was mostly used like DATA32, ie. color data (one pixel color or a pixel buffer).
-rw-r--r--src/lib/ector/software/ector_software_gradient.c30
-rw-r--r--src/lib/ector/software/ector_software_private.h8
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c6
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h2
-rw-r--r--src/static_libs/draw/draw.h16
-rw-r--r--src/static_libs/draw/draw_main.c18
-rw-r--r--src/static_libs/draw/draw_main_neon.c4
-rw-r--r--src/static_libs/draw/draw_main_sse2.c16
8 files changed, 50 insertions, 50 deletions
diff --git a/src/lib/ector/software/ector_software_gradient.c b/src/lib/ector/software/ector_software_gradient.c
index f840f73c2c..5472becfad 100644
--- a/src/lib/ector/software/ector_software_gradient.c
+++ b/src/lib/ector/software/ector_software_gradient.c
@@ -15,10 +15,10 @@
#define FIXPT_BITS 8
#define FIXPT_SIZE (1<<FIXPT_BITS)
-typedef void (*Ector_Radial_Helper_Func)(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
+typedef void (*Ector_Radial_Helper_Func)(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
float det, float delta_det, float delta_delta_det, float b, float delta_b);
-typedef void (*Ector_Linear_Helper_Func)(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
+typedef void (*Ector_Linear_Helper_Func)(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
int t_fixed, int inc_fixed);
static Ector_Radial_Helper_Func _ector_radial_helper;
@@ -50,7 +50,7 @@ _gradient_clamp(const Ector_Renderer_Software_Gradient_Data *data, int ipos)
return ipos;
}
-static uint
+static uint32_t
_gradient_pixel_fixed(const Ector_Renderer_Software_Gradient_Data *data, int fixed_pos)
{
int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS;
@@ -58,7 +58,7 @@ _gradient_pixel_fixed(const Ector_Renderer_Software_Gradient_Data *data, int fix
return data->color_table[_gradient_clamp(data, ipos)];
}
-static inline uint
+static inline uint32_t
_gradient_pixel(const Ector_Renderer_Software_Gradient_Data *data, float pos)
{
int ipos = (int)(pos * (GRADIENT_STOPTABLE_SIZE - 1) + (float)(0.5));
@@ -127,7 +127,7 @@ loop_break(unsigned int *buffer, int length, int *lprealign, int *lby4 , int *lr
}
static void
-_radial_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
+_radial_helper_sse3(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
float det, float delta_det, float delta_delta_det, float b, float delta_b)
{
int lprealign, lby4, lremaining, i;
@@ -198,7 +198,7 @@ _radial_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_D
}
static void
-_linear_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, int t, int inc)
+_linear_helper_sse3(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, int t, int inc)
{
int lprealign, lby4, lremaining, i;
vec4_i t_vec;
@@ -232,8 +232,8 @@ _linear_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_D
v_min = _mm_set1_epi32(0);
v_max = _mm_set1_epi32((GRADIENT_STOPTABLE_SIZE - 1));
- v_repeat_mask = _mm_set1_epi32(~((uint)(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT));
- v_reflect_mask = _mm_set1_epi32(~((uint)(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT + 1)));
+ v_repeat_mask = _mm_set1_epi32(~((uint32_t)(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT));
+ v_reflect_mask = _mm_set1_epi32(~((uint32_t)(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT + 1)));
v_reflect_limit = _mm_set1_epi32(2 * GRADIENT_STOPTABLE_SIZE - 1);
@@ -289,12 +289,12 @@ _ease_linear(double t)
}
static Eina_Bool
-_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint *color_table, int size)
+_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint32_t *color_table, int size)
{
int dist, idist, pos = 0, i;
Eina_Bool alpha = EINA_FALSE;
Efl_Gfx_Gradient_Stop *curr, *next;
- uint current_color, next_color;
+ uint32_t current_color, next_color;
double delta, t, incr, fpos;
assert(stop_count > 0);
@@ -366,7 +366,7 @@ destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata)
}
static void
-_linear_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
+_linear_helper_generic(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
int t_fixed, int inc_fixed)
{
int i;
@@ -379,11 +379,11 @@ _linear_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradien
}
void
-fetch_linear_gradient(uint *buffer, Span_Data *data, int y, int x, int length)
+fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length)
{
Ector_Renderer_Software_Gradient_Data *g_data = data->gradient;
float t, inc, rx=0, ry=0;
- uint *end;
+ uint32_t *end;
int t_fixed, inc_fixed;
if (g_data->linear.l == 0)
@@ -429,7 +429,7 @@ fetch_linear_gradient(uint *buffer, Span_Data *data, int y, int x, int length)
}
static void
-_radial_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, float det,
+_radial_helper_generic(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, float det,
float delta_det, float delta_delta_det, float b, float delta_b)
{
int i;
@@ -445,7 +445,7 @@ _radial_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradien
void
-fetch_radial_gradient(uint *buffer, Span_Data *data, int y, int x, int length)
+fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length)
{
Ector_Renderer_Software_Gradient_Data *g_data = data->gradient;
float rx, ry, inv_a, delta_rx, delta_ry, b, delta_b, b_delta_b, delta_b_delta_b,
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index 5a05aa51a9..e13342d02d 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -35,7 +35,7 @@ typedef struct _Ector_Renderer_Software_Gradient_Data
Software_Gradient_Radial_Data radial;
};
Eina_Bool alpha;
- uint* color_table;
+ uint32_t* color_table;
} Ector_Renderer_Software_Gradient_Data;
typedef struct _Shape_Rle_Data
@@ -123,7 +123,7 @@ void ector_software_rasterizer_clip_shape_set(Software_Rasterizer *rasterizer, S
Shape_Rle_Data * ector_software_rasterizer_generate_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline);
Shape_Rle_Data * ector_software_rasterizer_generate_stroke_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline, Eina_Bool closePath);
-void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer, int x, int y, uint mul_col, Efl_Gfx_Render_Op op, Shape_Rle_Data* rle);
+void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer, int x, int y, uint32_t mul_col, Efl_Gfx_Render_Op op, Shape_Rle_Data* rle);
void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle);
@@ -132,7 +132,7 @@ void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle);
// Gradient Api
void update_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
void destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
-void fetch_linear_gradient(uint *buffer, Span_Data *data, int y, int x, int length);
-void fetch_radial_gradient(uint *buffer, Span_Data *data, int y, int x, int length);
+void fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
+void fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
#endif
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index 7282144c3b..a25a039490 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -16,7 +16,7 @@ _blend_color_argb(int count, const SW_FT_Span *spans, void *user_data)
{
RGBA_Comp_Func_Solid comp_func;
Span_Data *data = (Span_Data *)(user_data);
- uint color, *buffer, *target;
+ uint32_t color, *buffer, *target;
const int pix_stride = data->raster_buffer->stride / 4;
// multiply the color with mul_col if any
@@ -461,7 +461,7 @@ ector_software_rasterizer_generate_rle_data(Software_Rasterizer *rasterizer, SW_
Shape_Rle_Data *
ector_software_rasterizer_generate_stroke_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline, Eina_Bool closePath)
{
- uint points,contors;
+ uint32_t points,contors;
Shape_Rle_Data *rle_data;
SW_FT_Outline strokeOutline = { 0, 0, NULL, NULL, NULL, 0 };
@@ -564,7 +564,7 @@ void ector_software_rasterizer_buffer_set(Software_Rasterizer *rasterizer,
}
void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer,
- int x, int y, uint mul_col,
+ int x, int y, uint32_t mul_col,
Efl_Gfx_Render_Op op, Shape_Rle_Data* rle)
{
// check for NULL rle data
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
index 5a41d71391..0bc3e728d3 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
@@ -1713,7 +1713,7 @@ _EVASGL_EXT_END()
_EVASGL_EXT_BEGIN(GLX_SGI_video_sync)
_EVASGL_EXT_DRVNAME(GLX_SGI_video_sync)
- _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(int, glXGetVideoSyncSGI, (uint *count))
+ _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(int, glXGetVideoSyncSGI, (uint32_t *count))
_EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glXGetVideoSyncSGI")
_EVASGL_EXT_FUNCTION_PRIVATE_END()
_EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(int, glXWaitVideoSyncSGI, (int divisor, int remainder, unsigned int *count))
diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h
index ae00cc26fd..c25517d93e 100644
--- a/src/static_libs/draw/draw.h
+++ b/src/static_libs/draw/draw.h
@@ -7,14 +7,14 @@
#include <Efl.h>
-typedef void (*RGBA_Comp_Func) (uint *dest, const uint *src, int length, uint mul_col, uint const_alpha);
-typedef void (*RGBA_Comp_Func_Solid) (uint *dest, int length, uint color, uint const_alpha);
+typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha);
+typedef void (*RGBA_Comp_Func_Solid) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha);
typedef void (*Alpha_Gfx_Func) (uint8_t *src, uint8_t *dst, int len);
int efl_draw_init(void);
-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);
+RGBA_Comp_Func efl_draw_func_span_get(Efl_Gfx_Render_Op op, uint32_t color, Eina_Bool src_alpha);
+RGBA_Comp_Func_Solid efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint32_t color);
Alpha_Gfx_Func efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask);
@@ -61,10 +61,10 @@ Alpha_Gfx_Func efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask)
( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \
(((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) )
-static inline uint
-draw_interpolate_256(uint x, uint a, uint y, uint b)
+static inline uint32_t
+draw_interpolate_256(uint32_t x, uint32_t a, uint32_t y, uint32_t b)
{
- uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
+ uint32_t t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t >>= 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
@@ -74,7 +74,7 @@ draw_interpolate_256(uint x, uint a, uint y, uint b)
}
static inline void
-draw_memset32(uint *dest, uint value, int length)
+draw_memset32(uint32_t *dest, uint32_t value, int length)
{
int n;
diff --git a/src/static_libs/draw/draw_main.c b/src/static_libs/draw/draw_main.c
index 8db3d20885..1d19de3a1a 100644
--- a/src/static_libs/draw/draw_main.c
+++ b/src/static_libs/draw/draw_main.c
@@ -22,7 +22,7 @@
*/
static void
-_comp_func_solid_source_over(uint *dest, int length, uint color, uint const_alpha)
+_comp_func_solid_source_over(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
{
int ialpha, i;
@@ -34,10 +34,10 @@ _comp_func_solid_source_over(uint *dest, int length, uint color, uint const_alph
}
static void
-_comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint const_alpha)
+_comp_func_source_over(uint32_t *dest, const uint32_t *src, int length, uint32_t color, uint32_t const_alpha)
{
int i;
- uint s, sc, sia;
+ uint32_t s, sc, sia;
if (const_alpha != 255)
color = DRAW_BYTE_MUL(color, const_alpha);
@@ -73,7 +73,7 @@ _comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint
dest = s * ca + d * cia
*/
static void
-_comp_func_solid_source(uint *dest, int length, uint color, uint const_alpha)
+_comp_func_solid_source(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
{
int ialpha, i;
@@ -91,16 +91,16 @@ _comp_func_solid_source(uint *dest, int length, uint color, uint const_alpha)
}
static void
-_comp_func_source(uint *dest, const uint *src, int length, uint color, uint const_alpha)
+_comp_func_source(uint32_t *dest, const uint32_t *src, int length, uint32_t color, uint32_t const_alpha)
{
int i, ialpha;
- uint src_color;
+ uint32_t src_color;
if (color == 0xffffffff) // No color multiplier
{
if (const_alpha == 255)
{
- memcpy(dest, src, length * sizeof(uint));
+ memcpy(dest, src, length * sizeof(uint32_t));
}
else
{
@@ -139,7 +139,7 @@ RGBA_Comp_Func func_for_mode[EFL_GFX_RENDER_OP_LAST] = {
};
RGBA_Comp_Func_Solid
-efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint color)
+efl_draw_func_solid_span_get(Efl_Gfx_Render_Op op, uint32_t color)
{
if ((color & 0xff000000) == 0xff000000)
{
@@ -150,7 +150,7 @@ 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)
+efl_draw_func_span_get(Efl_Gfx_Render_Op op, uint32_t color, Eina_Bool src_alpha)
{
if (((color & 0xff000000) == 0xff000000) && !src_alpha)
{
diff --git a/src/static_libs/draw/draw_main_neon.c b/src/static_libs/draw/draw_main_neon.c
index 2d87d6933f..044114733e 100644
--- a/src/static_libs/draw/draw_main_neon.c
+++ b/src/static_libs/draw/draw_main_neon.c
@@ -9,7 +9,7 @@
#include <arm_neon.h>
static void
-comp_func_solid_source_over_neon(uint * __restrict dest, int length, uint color, uint const_alpha)
+comp_func_solid_source_over_neon(uint32_t * __restrict dest, int length, uint32_t color, uint32_t const_alpha)
{
uint16x8_t temp00_16x8;
uint16x8_t temp01_16x8;
@@ -100,7 +100,7 @@ comp_func_solid_source_over_neon(uint * __restrict dest, int length, uint color,
/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
* reads, then two writes, a miss on read is 'just' two reads */
static void
-comp_func_source_over_sse2(uint * __restrict dest, const uint * __restrict src, int length, uint color, uint const_alpha)
+comp_func_source_over_sse2(uint32_t * __restrict dest, const uint32_t * __restrict src, int length, uint32_t color, uint32_t const_alpha)
{
uint16x8_t ad0_16x8;
uint16x8_t ad1_16x8;
diff --git a/src/static_libs/draw/draw_main_sse2.c b/src/static_libs/draw/draw_main_sse2.c
index c07234a4f8..e8f934055b 100644
--- a/src/static_libs/draw/draw_main_sse2.c
+++ b/src/static_libs/draw/draw_main_sse2.c
@@ -118,7 +118,7 @@ v4_ialpha_sse2(__m128i c)
// dest = color + (dest * alpha)
inline static void
-comp_func_helper_sse2 (uint *dest, int length, uint color, uint alpha)
+comp_func_helper_sse2(uint32_t *dest, int length, uint32_t color, uint32_t alpha)
{
const __m128i v_color = _mm_set1_epi32(color);
const __m128i v_a = _mm_set1_epi16(alpha);
@@ -141,7 +141,7 @@ comp_func_helper_sse2 (uint *dest, int length, uint color, uint alpha)
}
void
-comp_func_solid_source_sse2(uint *dest, int length, uint color, uint const_alpha)
+comp_func_solid_source_sse2(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
{
if (const_alpha == 255)
{
@@ -158,7 +158,7 @@ comp_func_solid_source_sse2(uint *dest, int length, uint color, uint const_alpha
}
void
-comp_func_solid_source_over_sse2(uint *dest, int length, uint color, uint const_alpha)
+comp_func_solid_source_over_sse2(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
{
int ialpha;
@@ -202,16 +202,16 @@ comp_func_solid_source_over_sse2(uint *dest, int length, uint color, uint const_
v_src = v4_interpolate_color_sse2(v_alpha, v_src, v_dest);
static void
-comp_func_source_sse2(uint *dest, const uint *src, int length, uint color, uint const_alpha)
+comp_func_source_sse2(uint32_t *dest, const uint32_t *src, int length, uint32_t color, uint32_t const_alpha)
{
int ialpha;
- uint src_color;
+ uint32_t src_color;
if (color == 0xffffffff) // No color multiplier
{
if (const_alpha == 255)
{
- memcpy(dest, src, length * sizeof(uint));
+ memcpy(dest, src, length * sizeof(uint32_t));
}
else
{
@@ -272,9 +272,9 @@ comp_func_source_sse2(uint *dest, const uint *src, int length, uint color, uint
}
static void
-comp_func_source_over_sse2(uint *dest, const uint *src, int length, uint color, uint const_alpha)
+comp_func_source_over_sse2(uint32_t *dest, const uint32_t *src, int length, uint32_t color, uint32_t const_alpha)
{
- uint s, sia;
+ uint32_t s, sia;
if (const_alpha != 255)
color = DRAW_BYTE_MUL(color, const_alpha);