remove tons of trailing spaces

SVN revision: 35171
This commit is contained in:
doursse 2008-07-19 17:40:52 +00:00 committed by doursse
parent 261189e2e2
commit 193c21da9e
23 changed files with 236 additions and 237 deletions

View File

@ -322,4 +322,3 @@ evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RG
return func;
return _composite_pt_nothing;
}

View File

@ -122,7 +122,7 @@ evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len)
src += len - 1;
while (dst < dst_end)
*dst++ = *src--;
*dst++ = *src--;
}
#ifdef BUILD_C
@ -132,7 +132,7 @@ evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len)
DATA32 *dst_end = dst + len;
while (dst < dst_end)
*dst++ = *src++;
*dst++ = *src++;
}
#endif
@ -245,7 +245,7 @@ evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
src_ptr++;
dst_ptr++;
}
#if 0
#if 0
#ifdef ALIGN_FIX
int src_align;
int dst_align;
@ -290,7 +290,7 @@ evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
src_ptr++;
dst_ptr++;
}
#endif
#endif
}
#endif

View File

@ -15,8 +15,8 @@ evas_common_convert_argb_premul(DATA32 *data, unsigned int len)
{
DATA32 a = 1 + (*data >> 24);
*data = (*data & 0xff000000) +
(((((*data) >> 8) & 0xff) * a) & 0xff00) +
*data = (*data & 0xff000000) +
(((((*data) >> 8) & 0xff) * a) & 0xff00) +
(((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
data++;
}
@ -32,9 +32,9 @@ evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len)
DATA32 a = (*data >> 24);
if ((a > 0) && (a < 255))
*data = ARGB_JOIN(a,
(R_VAL(data) * 255) / a,
(G_VAL(data) * 255) / a,
*data = ARGB_JOIN(a,
(R_VAL(data) * 255) / a,
(G_VAL(data) * 255) / a,
(B_VAL(data) * 255) / a);
data++;
}
@ -131,7 +131,7 @@ evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, fl
{
if (s) *s = 0;
if (h) *h = 0;
return;
return;
}
if (s) *s = (d / (float)max);
@ -221,7 +221,7 @@ evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, in
if (!max)
{
*s = *h = 0;
return;
return;
}
*s = ((d * 255) / max);

View File

@ -163,7 +163,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
{
if ((rmask == 0) && (gmask == 0) && (bmask == 0))
{
if (depth == 8)
if (depth == 8)
{
#ifdef BUILD_CONVERT_8_RGB_332
if (pal_mode == PAL_MODE_RGB332)
@ -194,10 +194,10 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
#endif
}
if (depth == 1)
if (depth == 1)
{
}
if (depth == 4)
if (depth == 4)
{
}
}
@ -296,7 +296,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
else
return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
}
#endif
#ifdef BUILD_CONVERT_16_RGB_ROT180
@ -454,7 +454,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
}
#endif
}
if (depth == 32)
if (depth == 32)
{
#ifdef BUILD_CONVERT_32_RGB_8888
if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
@ -541,7 +541,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
}
#endif
}
if (depth == 24)
if (depth == 24)
{
#ifdef BUILD_CONVERT_24_RGB_888
if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
@ -559,7 +559,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
#endif
}
printf("depth = %i mode = %i\n", depth, pal_mode);
if (depth == 8)
if (depth == 8)
{
#ifdef BUILD_CONVERT_8_RGB_332
if (pal_mode == PAL_MODE_RGB332)
@ -590,10 +590,10 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
#endif
}
if (depth == 1)
if (depth == 1)
{
}
if (depth == 4)
if (depth == 4)
{
}
}

View File

@ -156,7 +156,7 @@ int
evas_common_cpu_have_cpuid(void)
{
return 0;
/*
/*
#ifdef BUILD_MMX
unsigned int have_cpu_id;
@ -218,9 +218,9 @@ evas_common_cpu_count(void)
cpu_set_t cpu;
int i;
static int cpus = 0;
if (cpus != 0) return cpus;
sched_getaffinity(getpid(), sizeof(cpu), &cpu);
for (i = 0; i < TH_MAX; i++)
{
@ -230,5 +230,5 @@ evas_common_cpu_count(void)
return cpus;
#else
return 1;
#endif
#endif
}

View File

@ -42,14 +42,14 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
dot = strrchr (ie->file, '.');
if (dot)
{
for (i = 0, ++dot; i < (sizeof (loaders) / sizeof (struct ext_loader_s)); ++i)
{
if (!strcasecmp (dot, loaders[i].extention))
{
loader = loaders[i].loader;
break;
}
}
for (i = 0, ++dot; i < (sizeof (loaders) / sizeof (struct ext_loader_s)); ++i)
{
if (!strcasecmp (dot, loaders[i].extention))
{
loader = loaders[i].loader;
break;
}
}
}
if (loader)

View File

@ -93,14 +93,14 @@ evas_common_image_shutdown(void)
//// printf("REF--=%i\n", reference);
// DISABLE for now - something wrong with cache shutdown freeing things
// still in use - rage_thumb segv's now.
//
//
// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
// because in eng_setup() when a buffer changes size it is FIRST freed
// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
// where it should stay at 1. - see evas_engine.c in the buffer enigne for
// example. eng_output_free() is called BEFORE _output_setup(). although this
// is only a SIGNE of the problem. we can patch this up with either freeing
// after the setup (so we just pt a ref of 2 then back to 1), or just
// after the setup (so we just pt a ref of 2 then back to 1), or just
// evas_common_image_init() at the start and evas_common_image_shutdown()
// after it all. really ref 0 should only be reached when no more canvases
// with no more objects exist anywhere.
@ -160,12 +160,12 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, int w, int h)
if (im->image.data == NULL) return -1;
#ifdef HAVE_VALGRIND
# ifdef VALGRIND_MAKE_READABLE
# ifdef VALGRIND_MAKE_READABLE
VALGRIND_MAKE_READABLE(im->image.data, siz);
# else
# ifdef VALGRIND_MAKE_MEM_DEFINED
# else
# ifdef VALGRIND_MAKE_MEM_DEFINED
VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz);
# endif
# endif
# endif
#endif
@ -320,8 +320,8 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
/* { */
/* if ((is->data) && (!is->no_free)) */
/* { */
/* free(is->data); */
/* is->data = NULL; */
/* free(is->data); */
/* is->data = NULL; */
/* } */
/* } */
@ -437,7 +437,7 @@ evas_common_image_line_buffer_obtain(int len)
if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN)
len = EVAS_RGBA_LINE_BUFFER_MIN_LEN;
return evas_common_image_create(len, 1);
/*
/*
if (evas_rgba_line_buffer)
{
if (evas_rgba_line_buffer->image->w >= len)
@ -462,7 +462,7 @@ EAPI void
evas_common_image_line_buffer_release(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
/*
/*
if (!evas_rgba_line_buffer) return;
if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w)
{
@ -482,7 +482,7 @@ EAPI void
evas_common_image_line_buffer_free(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
/*
/*
if (!evas_rgba_line_buffer) return;
evas_common_image_free(evas_rgba_line_buffer);
evas_rgba_line_buffer = NULL;
@ -496,7 +496,7 @@ evas_common_image_alpha_line_buffer_obtain(int len)
if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN)
len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN;
return evas_common_image_alpha_create(len, 1);
/*
/*
if (evas_alpha_line_buffer)
{
if (evas_alpha_line_buffer->image->w >= len)
@ -520,7 +520,7 @@ EAPI void
evas_common_image_alpha_line_buffer_release(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
/*
/*
if (!evas_alpha_line_buffer) return;
if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w)
{
@ -552,7 +552,7 @@ evas_common_image_premul(Image_Entry *ie)
{
DATA32 a = 1 + (*s >> 24);
*s = (*s & 0xff000000) + (((((*s) >> 8) & 0xff) * a) & 0xff00) +
*s = (*s & 0xff000000) + (((((*s) >> 8) & 0xff) * a) & 0xff00) +
(((((*s) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
s++;
if ((a == 1) || (a == 256))

View File

@ -13,12 +13,12 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
Evas_Image_Save_Func *evas_image_save_func = NULL;
char *p;
char *saver = NULL;
p = strrchr(file, '.');
if (p)
{
p++;
if (!strcasecmp(p, "png"))
saver = "png";
if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) ||
@ -34,7 +34,7 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
if (saver)
{
Evas_Module *em;
em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver);
if (em)
{

View File

@ -160,14 +160,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
if (dx < 0)
{
int tmp = x1;
x1 = x0;
x0 = tmp;
}
if (x0 < lx) x0 = lx;
if (x1 > rx) x1 = rx;
len = x1 - x0 + 1;
p = dst->image.data + (dstw * y0) + x0;
sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
@ -187,7 +187,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
{
if (y0 < ty) y0 = ty;
if (y1 > by) y1 = by;
len = y1 - y0 + 1;
p = dst->image.data + (dstw * y0) + x0;
while (len--)
@ -208,7 +208,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
{
int p0_in, p1_in;
p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0);
p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0);
p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0);
if (dx > 0)
@ -611,9 +611,9 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
if ((unsigned)(px) < clw)
{
aa = ((yy - (y << 16)) >> 8);
if ((unsigned)(py) < clh)
if ((unsigned)(py) < clh)
pfunc(0, 255 - aa, color, p);
if ((unsigned)(py + 1) < clh)
if ((unsigned)(py + 1) < clh)
pfunc(0, aa, color, p + dstw);
}
yy += dyy;

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, D
static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_add = { "add",
static RGBA_Gfx_Compositor _composite_add = { "add",
op_add_init, op_add_shutdown,
op_add_pixel_span_get, op_add_color_span_get,
op_add_pixel_color_span_get, op_add_mask_color_span_get,
op_add_pixel_span_get, op_add_color_span_get,
op_add_pixel_color_span_get, op_add_mask_color_span_get,
op_add_pixel_mask_span_get,
op_add_pixel_pt_get, op_add_color_pt_get,
op_add_pixel_color_pt_get, op_add_mask_color_pt_get,
op_add_pixel_pt_get, op_add_color_pt_get,
op_add_pixel_color_pt_get, op_add_mask_color_pt_get,
op_add_pixel_mask_pt_get
};
@ -52,13 +52,13 @@ static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flag
static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel",
static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel",
op_add_rel_init, op_add_rel_shutdown,
op_add_rel_pixel_span_get, op_add_rel_color_span_get,
op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get,
op_add_rel_pixel_span_get, op_add_rel_color_span_get,
op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get,
op_add_rel_pixel_mask_span_get,
op_add_rel_pixel_pt_get, op_add_rel_color_pt_get,
op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get,
op_add_rel_pixel_pt_get, op_add_rel_color_pt_get,
op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get,
op_add_rel_pixel_mask_pt_get
};
@ -216,7 +216,7 @@ op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
return add_gfx_span_func_cpu(s, m, c, d);
}
static RGBA_Gfx_Pt_Func
static RGBA_Gfx_Pt_Func
add_gfx_pt_func_cpu(int s, int m, int c, int d)
{
RGBA_Gfx_Pt_Func func = NULL;
@ -446,7 +446,7 @@ op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
return add_rel_gfx_span_func_cpu(s, m, c, d);
}
static RGBA_Gfx_Pt_Func
static RGBA_Gfx_Pt_Func
add_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
{
RGBA_Gfx_Pt_Func func = NULL;

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags,
static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_blend = { "blend",
static RGBA_Gfx_Compositor _composite_blend = { "blend",
op_blend_init, op_blend_shutdown,
op_blend_pixel_span_get, op_blend_color_span_get,
op_blend_pixel_color_span_get, op_blend_mask_color_span_get,
op_blend_pixel_span_get, op_blend_color_span_get,
op_blend_pixel_color_span_get, op_blend_mask_color_span_get,
op_blend_pixel_mask_span_get,
op_blend_pixel_pt_get, op_blend_color_pt_get,
op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get,
op_blend_pixel_pt_get, op_blend_color_pt_get,
op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get,
op_blend_pixel_mask_pt_get
};
@ -53,13 +53,13 @@ static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_fl
static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
op_blend_rel_init, op_blend_rel_shutdown,
op_blend_rel_pixel_span_get, op_blend_rel_color_span_get,
op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get,
static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
op_blend_rel_init, op_blend_rel_shutdown,
op_blend_rel_pixel_span_get, op_blend_rel_color_span_get,
op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get,
op_blend_rel_pixel_mask_span_get,
op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get,
op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get,
op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get,
op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get,
op_blend_rel_pixel_mask_pt_get
};

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags,
static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_copy = { "copy",
op_copy_init, op_copy_shutdown,
op_copy_pixel_span_get, op_copy_color_span_get,
op_copy_pixel_color_span_get, op_copy_mask_color_span_get,
op_copy_pixel_mask_span_get,
op_copy_pixel_pt_get, op_copy_color_pt_get,
op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get,
static RGBA_Gfx_Compositor _composite_copy = { "copy",
op_copy_init, op_copy_shutdown,
op_copy_pixel_span_get, op_copy_color_span_get,
op_copy_pixel_color_span_get, op_copy_mask_color_span_get,
op_copy_pixel_mask_span_get,
op_copy_pixel_pt_get, op_copy_color_pt_get,
op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get,
op_copy_pixel_mask_pt_get
};
@ -53,13 +53,13 @@ static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_fla
static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel",
op_copy_rel_init, op_copy_rel_shutdown,
op_copy_rel_pixel_span_get, op_copy_rel_color_span_get,
op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get,
op_copy_rel_pixel_mask_span_get,
op_copy_rel_pixel_pt_get, op_copy_color_pt_get,
op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get,
static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel",
op_copy_rel_init, op_copy_rel_shutdown,
op_copy_rel_pixel_span_get, op_copy_rel_color_span_get,
op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get,
op_copy_rel_pixel_mask_span_get,
op_copy_rel_pixel_pt_get, op_copy_color_pt_get,
op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get,
op_copy_rel_pixel_mask_pt_get
};
@ -233,7 +233,7 @@ op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
return copy_gfx_span_func_cpu(s, m, c, d);
}
static RGBA_Gfx_Pt_Func
static RGBA_Gfx_Pt_Func
copy_gfx_pt_func_cpu(int s, int m, int c, int d)
{
RGBA_Gfx_Pt_Func func = NULL;

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags,
static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_mask = { "mask",
static RGBA_Gfx_Compositor _composite_mask = { "mask",
op_mask_init, op_mask_shutdown,
op_mask_pixel_span_get, op_mask_color_span_get,
op_mask_pixel_color_span_get, op_mask_mask_color_span_get,
op_mask_pixel_span_get, op_mask_color_span_get,
op_mask_pixel_color_span_get, op_mask_mask_color_span_get,
op_mask_pixel_mask_span_get,
op_mask_pixel_pt_get, op_mask_color_pt_get,
op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get,
op_mask_pixel_pt_get, op_mask_color_pt_get,
op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get,
op_mask_pixel_mask_pt_get
};

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, D
static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_mul = { "mul",
static RGBA_Gfx_Compositor _composite_mul = { "mul",
op_mul_init, op_mul_shutdown,
op_mul_pixel_span_get, op_mul_color_span_get,
op_mul_pixel_color_span_get, op_mul_mask_color_span_get,
op_mul_pixel_span_get, op_mul_color_span_get,
op_mul_pixel_color_span_get, op_mul_mask_color_span_get,
op_mul_pixel_mask_span_get,
op_mul_pixel_pt_get, op_mul_color_pt_get,
op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get,
op_mul_pixel_pt_get, op_mul_color_pt_get,
op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get,
op_mul_pixel_mask_pt_get
};

View File

@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, D
static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_sub = { "sub",
static RGBA_Gfx_Compositor _composite_sub = { "sub",
op_sub_init, op_sub_shutdown,
op_sub_pixel_span_get, op_sub_color_span_get,
op_sub_pixel_color_span_get, op_sub_mask_color_span_get,
op_sub_pixel_span_get, op_sub_color_span_get,
op_sub_pixel_color_span_get, op_sub_mask_color_span_get,
op_sub_pixel_mask_span_get,
op_sub_pixel_pt_get, op_sub_color_pt_get,
op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get,
op_sub_pixel_pt_get, op_sub_color_pt_get,
op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get,
op_sub_pixel_mask_pt_get
};
@ -52,13 +52,13 @@ static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flag
static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel",
static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel",
op_sub_rel_init, op_sub_rel_shutdown,
op_sub_rel_pixel_span_get, op_sub_rel_color_span_get,
op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get,
op_sub_rel_pixel_span_get, op_sub_rel_color_span_get,
op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get,
op_sub_rel_pixel_mask_span_get,
op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get,
op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get,
op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get,
op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get,
op_sub_rel_pixel_mask_pt_get
};
@ -216,7 +216,7 @@ op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
return sub_gfx_span_func_cpu(s, m, c, d);
}
static RGBA_Gfx_Pt_Func
static RGBA_Gfx_Pt_Func
sub_gfx_pt_func_cpu(int s, int m, int c, int d)
{
RGBA_Gfx_Pt_Func func = NULL;
@ -446,7 +446,7 @@ op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
return sub_rel_gfx_span_func_cpu(s, m, c, d);
}
static RGBA_Gfx_Pt_Func
static RGBA_Gfx_Pt_Func
sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
{
RGBA_Gfx_Pt_Func func = NULL;

View File

@ -237,7 +237,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
/* figure out dest start ptr */
dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
if (dc->mul.use)
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
else
@ -269,7 +269,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
+ src_region_y) * src_w);
/* scale to dst */
dptr = dst_ptr;
#ifdef DIRECT_SCALE
#ifdef DIRECT_SCALE
if ((!src->cache_entry.flags.alpha) &&
(!dst->cache_entry.flags.alpha) &&
(!dc->mul.use))
@ -292,7 +292,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
}
}
else
#endif
#endif
{
/* a scanline buffer */
buf = alloca(dst_clip_w * sizeof(DATA32));

View File

@ -9,7 +9,7 @@ SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst,
DATA32 *dst_ptr;
int dst_jump;
int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
int src_w, src_h, dst_w, dst_h;
int src_w, src_h, dst_w, dst_h;
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
return;

View File

@ -4,7 +4,7 @@
int *xapoints, *xapp;
int *yapoints, *yapp;
DATA32 *buf, *src_data;
RGBA_Gfx_Func func;
src_data = src->image.data;
@ -15,10 +15,10 @@
yapoints = scale_calc_a_points(src_region_h, dst_region_h);
if ( (!xpoints) || (!ypoints) || (!xapoints) || (!yapoints) )
goto done_scale_down;
/* a scanline buffer */
buf = alloca(dst_clip_w * sizeof(DATA32));
if (dc->mul.use)
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
else
@ -41,7 +41,7 @@
{
#include "evas_scale_smooth_scaler_downx_downy.c"
}
done_scale_down:
if (xpoints) free(xpoints);
if (ypoints) free(ypoints);

View File

@ -8,12 +8,12 @@
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
dyy = dst_clip_y - dst_region_y;
dxx = dst_clip_x - dst_region_x;
xp = xpoints + dxx;
yp = ypoints + dyy;
xapp = xapoints + dxx;
@ -33,7 +33,7 @@
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
a = (A_VAL(pix) * xap) >> 10;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
@ -85,7 +85,7 @@
*pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
@ -117,7 +117,7 @@
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
@ -166,7 +166,7 @@
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints + dxx;
@ -174,7 +174,7 @@
}
}
else
#endif
#endif
{
while (dst_clip_h--)
{
@ -187,7 +187,7 @@
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
@ -232,13 +232,13 @@
*pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;

View File

@ -8,7 +8,7 @@
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
dyy = dst_clip_y - dst_region_y;
@ -30,11 +30,11 @@
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
a = (A_VAL(pix) * yap) >> 10;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
@ -86,7 +86,7 @@
*pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
@ -114,12 +114,12 @@
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
pbuf = dptr;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
@ -175,7 +175,7 @@
}
}
else
#endif
#endif
{
while (dst_clip_h--)
{
@ -185,11 +185,11 @@
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
@ -234,7 +234,7 @@
*pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI

View File

@ -4,7 +4,7 @@
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
if (dc->mul.use)
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
@ -20,7 +20,7 @@
}
#ifdef EVAS_SLI
ysli++;
#endif
#endif
ptr += src_w;
dst_ptr += dst_w;
}

View File

@ -78,7 +78,7 @@
{
DATA32 p0, p1;
int ax;
sx = (sxx >> 16);
ax = 1 + ((sxx - (sx << 16)) >> 8);
p0 = p1 = *(psrc + sx);
@ -107,7 +107,7 @@
}
#ifdef EVAS_SLI
ysli++;
#endif
#endif
pdst += dst_w;
psrc += src_w;
buf += buf_step;
@ -129,7 +129,7 @@
#endif
{
int ay;
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
@ -142,7 +142,7 @@
while (pbuf < pbuf_end)
{
DATA32 p0 = *psrc, p2 = p0;
if ((sy + 1) < srh)
p2 = *(psrc + src_w);
#ifdef SCALE_USING_MMX
@ -167,7 +167,7 @@
}
#ifdef EVAS_SLI
ysli++;
#endif
#endif
pdst += dst_w;
syy += dsyy;
buf += buf_step;
@ -189,7 +189,7 @@
#endif
{
int ay;
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
@ -205,7 +205,7 @@
int ax;
DATA32 *p, *q;
DATA32 p0, p1, p2, p3;
sx = sxx >> 16;
ax = 1 + ((sxx - (sx << 16)) >> 8);
p = psrc + sx; q = p + src_w;

View File

@ -82,13 +82,13 @@ inline void
rect_init(rect_t *r, int x, int y, int w, int h)
{
r->area = w * h;
r->left = x;
r->top = y;
r->right = x + w;
r->bottom = y + h;
r->width = w;
r->height = h;
}
@ -104,10 +104,10 @@ rect_list_print(const list_t rects)
{
list_node_t *node;
int len;
len = 0;
for (node = rects.head; node != NULL; node = node->next) len++;
printf("[");
for (node = rects.head; node != NULL; node = node->next)
{
@ -145,11 +145,11 @@ inline void
rect_list_append(list_t *rects, const rect_t r)
{
rect_node_t *rect_node;
rect_node = (rect_node_t *)rect_list_node_pool_get();
rect_node->rect = r;
rect_node->_lst = list_node_zeroed;
rect_list_append_node(rects, (list_node_t *)rect_node);
}
@ -157,7 +157,7 @@ inline void
rect_list_append_xywh(list_t *rects, int x, int y, int w, int h)
{
rect_t r;
rect_init(&r, x, y, w, h);
rect_list_append(rects, r);
}
@ -167,7 +167,7 @@ rect_list_concat(list_t *rects, list_t *other)
{
if (!other->head)
return;
if (rects->tail)
{
rects->tail->next = other->head;
@ -196,7 +196,7 @@ rect_list_unlink_next(list_t *rects, list_node_t *parent_node)
node = rects->head;
rects->head = node->next;
}
if (rects->tail == node) rects->tail = parent_node;
*node = list_node_zeroed;
return node;
@ -215,12 +215,12 @@ void
rect_list_clear(list_t *rects)
{
list_node_t *node;
node = rects->head;
while (node)
{
list_node_t *aux;
aux = node->next;
rect_list_node_pool_put(node);
node = aux;
@ -232,21 +232,21 @@ static inline void
_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height)
{
int max_left, min_right, max_top, min_bottom;
if (a.left < b.left) max_left = b.left;
else max_left = a.left;
if (a.right < b.right) min_right = a.right;
else min_right = b.right;
*width = min_right - max_left;
if (a.top < b.top) max_top = b.top;
else max_top = a.top;
if (a.bottom < b.bottom) min_bottom = a.bottom;
else min_bottom = b.bottom;
*height = min_bottom - max_top;
}
@ -254,12 +254,12 @@ static inline void
_split_strict(list_t *dirty, const rect_t current, rect_t r)
{
int h_1, h_2, w_1, w_2;
h_1 = current.top - r.top;
h_2 = r.bottom - current.bottom;
w_1 = current.left - r.left;
w_2 = r.right - current.right;
if (h_1 > 0)
{
/* .--.r (b) .---.r2
@ -273,7 +273,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
r.height -= h_1;
r.top = current.top;
}
if (h_2 > 0)
{
/* .-------.cur (a)
@ -286,7 +286,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2);
r.height -= h_2;
}
if (w_1 > 0)
{
/* (b) r .----.cur (a)
@ -300,7 +300,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
/* r.width -= w_1; */
/* r.left = current.left; */
}
if (w_2 > 0)
{
/* .----.cur (a)
@ -321,16 +321,16 @@ rect_list_del_split_strict(list_t *rects, const rect_t del_r)
{
list_t modified = list_zeroed;
list_node_t *cur_node, *prev_node;
prev_node = NULL;
cur_node = rects->head;
while (cur_node)
{
int intra_width, intra_height;
rect_t current;
current = ((rect_node_t*)cur_node)->rect;
_calc_intra_rect_area(del_r, current, &intra_width, &intra_height);
if ((intra_width <= 0) || (intra_height <= 0))
{
@ -374,33 +374,33 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
list_t dirty = list_zeroed;
list_t new_dirty = list_zeroed;
list_node_t *cur_node;
if (!rects->head)
{
rect_list_append_node(rects, node);
return;
}
rect_list_append_node(&dirty, node);
cur_node = rects->head;
while (dirty.head)
{
rect_t current;
if (!cur_node)
{
rect_list_concat(rects, &dirty);
break;
}
current = ((rect_node_t*)cur_node)->rect;
while (dirty.head)
{
int intra_width, intra_height;
rect_t r;
r = ((rect_node_t *)dirty.head)->rect;
_calc_intra_rect_area(r, current, &intra_width, &intra_height);
if ((intra_width == r.width) && (intra_height == r.height))
@ -423,7 +423,7 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
tmp = rect_list_unlink_next(&dirty, NULL);
rect_list_append_node(&new_dirty, tmp);
}
else
else
{
_split_strict(&new_dirty, current, r);
rect_list_del_next(&dirty, NULL);
@ -431,7 +431,7 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
}
dirty = new_dirty;