forked from enlightenment/efl
* remove trailing spaces in evas_pipe.c
* move scale function declarations to their own files SVN revision: 35063
This commit is contained in:
parent
739be5c6b7
commit
493eb069a3
|
@ -73,13 +73,16 @@ evas_convert_rgb_24.h \
|
|||
evas_convert_rgb_32.h \
|
||||
evas_convert_rgb_8.h \
|
||||
evas_convert_yuv.h \
|
||||
evas_scale_main.h \
|
||||
evas_scale_smooth.h \
|
||||
evas_scale_smooth_scaler.c \
|
||||
evas_scale_smooth_scaler_down.c \
|
||||
evas_scale_smooth_scaler_downx.c \
|
||||
evas_scale_smooth_scaler_downx_downy.c \
|
||||
evas_scale_smooth_scaler_downy.c \
|
||||
evas_scale_smooth_scaler_noscale.c \
|
||||
evas_scale_smooth_scaler_up.c
|
||||
evas_scale_smooth_scaler_up.c \
|
||||
evas_scale_span.h
|
||||
|
||||
libevas_engine_common_la_DEPENDENCIES = \
|
||||
$(top_builddir)/config.h
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "evas_common.h"
|
||||
#include "evas_convert_main.h"
|
||||
#include "evas_convert_color.h"
|
||||
#include "evas_scale_span.h"
|
||||
|
||||
|
||||
static void _get_word(char *in, char *key);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include "evas_common.h"
|
||||
|
||||
static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op);
|
||||
|
@ -10,7 +14,7 @@ evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op)
|
|||
{
|
||||
RGBA_Pipe *p;
|
||||
int first_pipe = 0;
|
||||
|
||||
|
||||
if (!pipe)
|
||||
{
|
||||
first_pipe = 1;
|
||||
|
@ -86,7 +90,7 @@ evas_common_pipe_thread(void *data)
|
|||
for (p = info->im->pipe; p; p = (RGBA_Pipe *)((Evas_Object_List *)p)->next)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < p->op_num; i++)
|
||||
{
|
||||
if (p->op[i].op_func)
|
||||
|
@ -114,13 +118,13 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
{
|
||||
#ifdef BUILD_PTHREAD
|
||||
int i, y, h;
|
||||
|
||||
|
||||
if (!im->pipe) return;
|
||||
if (thread_num == 1) return;
|
||||
if (thread_num == 0)
|
||||
{
|
||||
int cpunum;
|
||||
|
||||
|
||||
cpunum = evas_common_cpu_count();
|
||||
thread_num = cpunum;
|
||||
if (thread_num == 1) return;
|
||||
|
@ -130,7 +134,7 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
{
|
||||
pthread_attr_t attr;
|
||||
cpu_set_t cpu;
|
||||
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
CPU_ZERO(&cpu);
|
||||
CPU_SET(i % cpunum, &cpu);
|
||||
|
@ -139,7 +143,7 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
thinfo[i].info = NULL;
|
||||
thinfo[i].barrier = thbarrier;
|
||||
/* setup initial locks */
|
||||
pthread_create(&(thinfo[i].thread_id), &attr,
|
||||
pthread_create(&(thinfo[i].thread_id), &attr,
|
||||
evas_common_pipe_thread, &(thinfo[i]));
|
||||
pthread_attr_destroy(&attr);
|
||||
}
|
||||
|
@ -150,7 +154,7 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
for (i = 0; i < thread_num; i++)
|
||||
{
|
||||
RGBA_Pipe_Thread_Info *info;
|
||||
|
||||
|
||||
// if (y >= im->cache_entry.h) break;
|
||||
info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
|
||||
info->im = im;
|
||||
|
@ -159,7 +163,7 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
info->w = im->cache_entry.w;
|
||||
info->y = i;
|
||||
info->h = thread_num;
|
||||
#else
|
||||
#else
|
||||
info->x = 0;
|
||||
info->y = y;
|
||||
info->w = im->cache_entry.w;
|
||||
|
@ -168,18 +172,18 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
else
|
||||
info->h = h;
|
||||
y += info->h;
|
||||
#endif
|
||||
#endif
|
||||
thinfo[i].info = info;
|
||||
}
|
||||
/* tell worker threads to start */
|
||||
pthread_barrier_wait(&(thbarrier[0]));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_pipe_flush(RGBA_Image *im)
|
||||
{
|
||||
|
||||
|
||||
RGBA_Pipe *p;
|
||||
int i;
|
||||
|
||||
|
@ -210,13 +214,13 @@ evas_common_pipe_flush(RGBA_Image *im)
|
|||
EAPI void
|
||||
evas_common_pipe_free(RGBA_Image *im)
|
||||
{
|
||||
|
||||
|
||||
RGBA_Pipe *p;
|
||||
int i;
|
||||
|
||||
|
||||
if (!im->pipe) return;
|
||||
/* FIXME: PTHREAD join all threads here (if not finished) */
|
||||
|
||||
|
||||
/* free pipe */
|
||||
while (im->pipe)
|
||||
{
|
||||
|
@ -241,29 +245,29 @@ evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_
|
|||
if (info)
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
||||
|
||||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
#ifdef EVAS_SLI
|
||||
evas_common_draw_context_set_sli(&(context), info->y, info->h);
|
||||
#else
|
||||
#else
|
||||
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
|
||||
#endif
|
||||
evas_common_rectangle_draw(dst, &(context),
|
||||
#endif
|
||||
evas_common_rectangle_draw(dst, &(context),
|
||||
op->op.rect.x, op->op.rect.y,
|
||||
op->op.rect.w, op->op.rect.h);
|
||||
}
|
||||
else
|
||||
evas_common_rectangle_draw(dst, &(op->context),
|
||||
evas_common_rectangle_draw(dst, &(op->context),
|
||||
op->op.rect.x, op->op.rect.y,
|
||||
op->op.rect.w, op->op.rect.h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
|
||||
evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
RGBA_Pipe_Op *op;
|
||||
|
||||
|
||||
if ((w < 1) || (h < 1)) return;
|
||||
dst->pipe = evas_common_pipe_add(dst->pipe, &op);
|
||||
if (!dst->pipe) return;
|
||||
|
@ -283,19 +287,19 @@ evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
|
|||
if (info)
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
||||
|
||||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
#ifdef EVAS_SLI
|
||||
evas_common_draw_context_set_sli(&(context), info->y, info->h);
|
||||
#else
|
||||
#else
|
||||
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
|
||||
#endif
|
||||
evas_common_line_draw(dst, &(context),
|
||||
#endif
|
||||
evas_common_line_draw(dst, &(context),
|
||||
op->op.line.x0, op->op.line.y0,
|
||||
op->op.line.x1, op->op.line.y1);
|
||||
}
|
||||
else
|
||||
evas_common_line_draw(dst, &(op->context),
|
||||
evas_common_line_draw(dst, &(op->context),
|
||||
op->op.line.x0, op->op.line.y0,
|
||||
op->op.line.x1, op->op.line.y1);
|
||||
}
|
||||
|
@ -305,7 +309,7 @@ evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
|
|||
int x0, int y0, int x1, int y1)
|
||||
{
|
||||
RGBA_Pipe_Op *op;
|
||||
|
||||
|
||||
dst->pipe = evas_common_pipe_add(dst->pipe, &op);
|
||||
if (!dst->pipe) return;
|
||||
op->op.line.x0 = x0;
|
||||
|
@ -322,7 +326,7 @@ static void
|
|||
evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op)
|
||||
{
|
||||
RGBA_Polygon_Point *p;
|
||||
|
||||
|
||||
while (op->op.poly.points)
|
||||
{
|
||||
p = op->op.poly.points;
|
||||
|
@ -338,13 +342,13 @@ evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
|
|||
if (info)
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
||||
|
||||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
#ifdef EVAS_SLI
|
||||
evas_common_draw_context_set_sli(&(context), info->y, info->h);
|
||||
#else
|
||||
#else
|
||||
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
|
||||
#endif
|
||||
#endif
|
||||
evas_common_polygon_draw(dst, &(context),
|
||||
op->op.poly.points);
|
||||
}
|
||||
|
@ -394,13 +398,13 @@ evas_common_pipe_grad_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
|
|||
if (info)
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
||||
|
||||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
#ifdef EVAS_SLI
|
||||
evas_common_draw_context_set_sli(&(context), info->y, info->h);
|
||||
#else
|
||||
#else
|
||||
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
|
||||
#endif
|
||||
#endif
|
||||
evas_common_gradient_draw(dst, &(context),
|
||||
op->op.grad.x, op->op.grad.y,
|
||||
op->op.grad.w, op->op.grad.h,
|
||||
|
@ -448,13 +452,13 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
|
|||
if (info)
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
||||
|
||||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
#ifdef EVAS_SLI
|
||||
evas_common_draw_context_set_sli(&(context), info->y, info->h);
|
||||
#else
|
||||
#else
|
||||
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
|
||||
#endif
|
||||
#endif
|
||||
evas_common_font_draw(dst, &(context),
|
||||
op->op.text.font, op->op.text.x, op->op.text.y,
|
||||
op->op.text.text);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include "evas_common.h"
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifndef _EVAS_SCALE_MAIN_H
|
||||
#define _EVAS_SCALE_MAIN_H
|
||||
|
||||
|
||||
EAPI void evas_common_scale_init (void);
|
||||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
|
||||
#endif /* _EVAS_SCALE_MAIN_H */
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include "evas_common.h"
|
||||
|
||||
void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include "evas_common.h"
|
||||
#include "evas_scale_smooth.h"
|
||||
|
||||
|
||||
static DATA32 **scale_calc_y_points(DATA32 *src, int sw, int sh, int dh);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifndef _EVAS_SCALE_SMOOTH_H
|
||||
#define _EVAS_SCALE_SMOOTH_H
|
||||
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
|
||||
#endif /* _EVAS_SCALE_SMOOTH_H */
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "evas_common.h"
|
||||
#include "evas_convert_color.h"
|
||||
#include "evas_scale_span.h"
|
||||
|
||||
static void
|
||||
evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifndef _EVAS_SCALE_SPAN_H
|
||||
#define _EVAS_SCALE_SPAN_H
|
||||
|
||||
|
||||
EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
|
||||
EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
|
||||
|
||||
#endif /* _EVAS_SCALE_SPAN_H */
|
|
@ -827,34 +827,7 @@ EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int
|
|||
|
||||
/****/
|
||||
#include "../engines/common/evas_convert_main.h"
|
||||
|
||||
/****/
|
||||
EAPI void evas_common_scale_init (void);
|
||||
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
|
||||
EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
|
||||
#include "../engines/common/evas_scale_main.h"
|
||||
|
||||
/****/
|
||||
/*done*/
|
||||
|
|
Loading…
Reference in New Issue