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).
#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;
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;
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));
}
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;
}
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;
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);
}
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);
}
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;
}
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)
}
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;
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,
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
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);
// 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
{
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
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 };
}
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
_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))
#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);
( (((((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;
}
static inline void
-draw_memset32(uint *dest, uint value, int length)
+draw_memset32(uint32_t *dest, uint32_t value, int length)
{
int n;
*/
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;
}
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);
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;
}
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
{
};
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)
{
}
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)
{
#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;
/* 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;
// 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);
}
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)
{
}
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;
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
{
}
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);