summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_gradient.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-03 20:15:17 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-12-03 20:28:27 +0900
commitc09199f0e036a4abb806dbc9fca4960316ecdd08 (patch)
tree59a97974def195fc0ede4f58130e44288c7b8450 /src/lib/ector/software/ector_software_gradient.c
parent648cef1db1b96e5d5dbae58f0dafa78e67958903 (diff)
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).
Diffstat (limited to 'src/lib/ector/software/ector_software_gradient.c')
-rw-r--r--src/lib/ector/software/ector_software_gradient.c30
1 files changed, 15 insertions, 15 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 @@
15#define FIXPT_BITS 8 15#define FIXPT_BITS 8
16#define FIXPT_SIZE (1<<FIXPT_BITS) 16#define FIXPT_SIZE (1<<FIXPT_BITS)
17 17
18typedef void (*Ector_Radial_Helper_Func)(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, 18typedef void (*Ector_Radial_Helper_Func)(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
19 float det, float delta_det, float delta_delta_det, float b, float delta_b); 19 float det, float delta_det, float delta_delta_det, float b, float delta_b);
20 20
21typedef void (*Ector_Linear_Helper_Func)(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, 21typedef void (*Ector_Linear_Helper_Func)(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
22 int t_fixed, int inc_fixed); 22 int t_fixed, int inc_fixed);
23 23
24static Ector_Radial_Helper_Func _ector_radial_helper; 24static Ector_Radial_Helper_Func _ector_radial_helper;
@@ -50,7 +50,7 @@ _gradient_clamp(const Ector_Renderer_Software_Gradient_Data *data, int ipos)
50 return ipos; 50 return ipos;
51} 51}
52 52
53static uint 53static uint32_t
54_gradient_pixel_fixed(const Ector_Renderer_Software_Gradient_Data *data, int fixed_pos) 54_gradient_pixel_fixed(const Ector_Renderer_Software_Gradient_Data *data, int fixed_pos)
55{ 55{
56 int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS; 56 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
58 return data->color_table[_gradient_clamp(data, ipos)]; 58 return data->color_table[_gradient_clamp(data, ipos)];
59} 59}
60 60
61static inline uint 61static inline uint32_t
62_gradient_pixel(const Ector_Renderer_Software_Gradient_Data *data, float pos) 62_gradient_pixel(const Ector_Renderer_Software_Gradient_Data *data, float pos)
63{ 63{
64 int ipos = (int)(pos * (GRADIENT_STOPTABLE_SIZE - 1) + (float)(0.5)); 64 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
127} 127}
128 128
129static void 129static void
130_radial_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, 130_radial_helper_sse3(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
131 float det, float delta_det, float delta_delta_det, float b, float delta_b) 131 float det, float delta_det, float delta_delta_det, float b, float delta_b)
132{ 132{
133 int lprealign, lby4, lremaining, i; 133 int lprealign, lby4, lremaining, i;
@@ -198,7 +198,7 @@ _radial_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_D
198} 198}
199 199
200static void 200static void
201_linear_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, int t, int inc) 201_linear_helper_sse3(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, int t, int inc)
202{ 202{
203 int lprealign, lby4, lremaining, i; 203 int lprealign, lby4, lremaining, i;
204 vec4_i t_vec; 204 vec4_i t_vec;
@@ -232,8 +232,8 @@ _linear_helper_sse3(uint *buffer, int length, Ector_Renderer_Software_Gradient_D
232 v_min = _mm_set1_epi32(0); 232 v_min = _mm_set1_epi32(0);
233 v_max = _mm_set1_epi32((GRADIENT_STOPTABLE_SIZE - 1)); 233 v_max = _mm_set1_epi32((GRADIENT_STOPTABLE_SIZE - 1));
234 234
235 v_repeat_mask = _mm_set1_epi32(~((uint)(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT)); 235 v_repeat_mask = _mm_set1_epi32(~((uint32_t)(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT));
236 v_reflect_mask = _mm_set1_epi32(~((uint)(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT + 1))); 236 v_reflect_mask = _mm_set1_epi32(~((uint32_t)(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT + 1)));
237 237
238 v_reflect_limit = _mm_set1_epi32(2 * GRADIENT_STOPTABLE_SIZE - 1); 238 v_reflect_limit = _mm_set1_epi32(2 * GRADIENT_STOPTABLE_SIZE - 1);
239 239
@@ -289,12 +289,12 @@ _ease_linear(double t)
289} 289}
290 290
291static Eina_Bool 291static Eina_Bool
292_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint *color_table, int size) 292_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint32_t *color_table, int size)
293{ 293{
294 int dist, idist, pos = 0, i; 294 int dist, idist, pos = 0, i;
295 Eina_Bool alpha = EINA_FALSE; 295 Eina_Bool alpha = EINA_FALSE;
296 Efl_Gfx_Gradient_Stop *curr, *next; 296 Efl_Gfx_Gradient_Stop *curr, *next;
297 uint current_color, next_color; 297 uint32_t current_color, next_color;
298 double delta, t, incr, fpos; 298 double delta, t, incr, fpos;
299 299
300 assert(stop_count > 0); 300 assert(stop_count > 0);
@@ -366,7 +366,7 @@ destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata)
366} 366}
367 367
368static void 368static void
369_linear_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, 369_linear_helper_generic(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data,
370 int t_fixed, int inc_fixed) 370 int t_fixed, int inc_fixed)
371{ 371{
372 int i; 372 int i;
@@ -379,11 +379,11 @@ _linear_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradien
379} 379}
380 380
381void 381void
382fetch_linear_gradient(uint *buffer, Span_Data *data, int y, int x, int length) 382fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length)
383{ 383{
384 Ector_Renderer_Software_Gradient_Data *g_data = data->gradient; 384 Ector_Renderer_Software_Gradient_Data *g_data = data->gradient;
385 float t, inc, rx=0, ry=0; 385 float t, inc, rx=0, ry=0;
386 uint *end; 386 uint32_t *end;
387 int t_fixed, inc_fixed; 387 int t_fixed, inc_fixed;
388 388
389 if (g_data->linear.l == 0) 389 if (g_data->linear.l == 0)
@@ -429,7 +429,7 @@ fetch_linear_gradient(uint *buffer, Span_Data *data, int y, int x, int length)
429} 429}
430 430
431static void 431static void
432_radial_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, float det, 432_radial_helper_generic(uint32_t *buffer, int length, Ector_Renderer_Software_Gradient_Data *g_data, float det,
433 float delta_det, float delta_delta_det, float b, float delta_b) 433 float delta_det, float delta_delta_det, float b, float delta_b)
434{ 434{
435 int i; 435 int i;
@@ -445,7 +445,7 @@ _radial_helper_generic(uint *buffer, int length, Ector_Renderer_Software_Gradien
445 445
446 446
447void 447void
448fetch_radial_gradient(uint *buffer, Span_Data *data, int y, int x, int length) 448fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length)
449{ 449{
450 Ector_Renderer_Software_Gradient_Data *g_data = data->gradient; 450 Ector_Renderer_Software_Gradient_Data *g_data = data->gradient;
451 float rx, ry, inv_a, delta_rx, delta_ry, b, delta_b, b_delta_b, delta_b_delta_b, 451 float rx, ry, inv_a, delta_rx, delta_ry, b, delta_b, b_delta_b, delta_b_delta_b,