evas: remove EVAS_SLI code path, it was to slow and unused for years.

NOTE: other things that may join it in the near futur EVAS_FRAME_QUEUE,
EVAS_METRIC_CACHE and maybe EVAS_WORD_CACHE also. This is all part of
cleaning up our rendering path so we can actually improve it more easily.


SVN revision: 70499
This commit is contained in:
Cedric BAIL 2012-04-26 08:41:39 +00:00
parent 0a5c840c48
commit 5965fb4282
14 changed files with 983 additions and 1189 deletions

View File

@ -711,3 +711,4 @@
2012-04-26 Cedric Bail
* Lock less font rendering.
* Removing EVAS_SLI.

View File

@ -6,6 +6,9 @@ Changes since Evas 1.2.0:
Improvements:
* Lock less font rendering.
Removal:
* Remove EVAS_SLI.
Evas 1.2.0
Changes since Evas 1.1.0:

View File

@ -303,10 +303,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
in_w = 0;
dx = chr_x;
dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y)
#endif
{
if ((dx < (ext_x + ext_w)) &&
(dy >= (ext_y)) &&
(dy < (ext_y + ext_h)))
@ -328,7 +325,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
}
}
}
}
else
{
DATA8 *tmpbuf = NULL, *dp, *tp, bits;
@ -345,10 +341,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
in_w = 0;
dx = chr_x;
dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y)
#endif
{
tp = tmpbuf;
dp = data + (i * fg->glyph_out->bitmap.pitch);
for (bi = 0; bi < w; bi += 8)
@ -386,7 +379,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
}
}
}
}
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_FONT
pixman_image_unref(font_mask_image);

View File

@ -176,10 +176,6 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
if (dy == 0)
{
#ifdef EVAS_SLI
if (((y0) % dc->sli.h) == dc->sli.y)
#endif
{
if ((y0 >= ty) && (y0 <= by))
{
if (dx < 0)
@ -217,7 +213,6 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
sfunc(NULL, NULL, color, p, len);
}
}
}
return;
}
@ -251,12 +246,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
{
while (len--)
{
#ifdef EVAS_SLI
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
pfunc(0, 255, color, p);
}
p += dstw;
}
}
@ -350,10 +340,6 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
while (len--)
{
#ifdef EVAS_SLI
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
@ -386,7 +372,6 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
#endif
p += dstw;
}
}
}
@ -628,10 +613,6 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
{
if (py < 0) goto next_x;
}
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN
@ -654,7 +635,7 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
#endif
pfunc(0, 255, color, p);
}
}
next_x:
yy += dyy;
px++;
@ -696,10 +677,6 @@ next_x:
{
if (px < 0) goto next_y;
}
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN
@ -722,7 +699,6 @@ next_x:
#endif
pfunc(0, 255, color, p);
}
}
next_y:
xx += dxx;
py++;
@ -732,7 +708,6 @@ next_y:
pix_y += pix_y_unit;
# endif
#endif
}
}

View File

@ -825,12 +825,6 @@ evas_common_pipe_begin(RGBA_Image *im)
// if (y >= im->cache_entry.h) break;
info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
info->im = im;
#ifdef EVAS_SLI
info->x = 0;
info->w = im->cache_entry.w;
info->y = i;
info->h = thread_num;
#else
info->x = 0;
info->y = y;
info->w = im->cache_entry.w;
@ -843,7 +837,6 @@ evas_common_pipe_begin(RGBA_Image *im)
info->h = h;
}
y += info->h;
#endif
thinfo[i].info = info;
}
/* tell worker threads to start */
@ -1025,11 +1018,7 @@ evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_rectangle_draw(dst, &(context),
op->op.rect.x, op->op.rect.y,
op->op.rect.w, op->op.rect.h);
@ -1068,11 +1057,7 @@ evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_line_draw(dst, &(context),
op->op.line.x0, op->op.line.y0,
op->op.line.x1, op->op.line.y1);
@ -1126,11 +1111,7 @@ evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_polygon_draw(dst, &(context),
op->op.poly.points, 0, 0);
}
@ -1211,11 +1192,7 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_font_draw(dst, &(context),
op->op.text.font, op->op.text.x, op->op.text.y,
&op->op.text.intl_props);
@ -1300,11 +1277,7 @@ evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thre
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
#ifdef SCALECACHE
evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
@ -1465,11 +1438,7 @@ evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread
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
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_map_rgba(op->op.map.src, dst,
&context, op->op.map.npoints, op->op.map.p,

View File

@ -287,10 +287,6 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
{
DATA32 *ptr;
#ifdef EVAS_SLI
if (((span->y) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_POLY
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
@ -314,7 +310,6 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
func(NULL, NULL, dc->col.col, ptr, span->w);
}
}
}
while (spans)
{
span = (RGBA_Span *)spans;

View File

@ -79,12 +79,8 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
ptr = dst->image.data + (y * dst->cache_entry.w) + x;
for (yy = 0; yy < h; yy++)
{
#ifdef EVAS_SLI
if (((yy + y) % dc->sli.h) == dc->sli.y)
#endif
{
func(NULL, NULL, dc->col.col, ptr, w);
}
ptr += dst->cache_entry.w;
}
}

View File

@ -328,12 +328,8 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
for (y = 0; y < dst_clip_h; y++)
{
/* * blend here [clip_w *] ptr -> dst_ptr * */
#ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
}
ptr += src_w;
dst_ptr += dst_w;
if (mask) mask += maskobj->cache_entry.w;
@ -357,10 +353,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
{
for (y = 0; y < dst_clip_h; y++)
{
# ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
# endif
{
dst_ptr = dptr;
for (x = 0; x < dst_clip_w; x++)
{
@ -368,7 +361,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
*dst_ptr = *ptr;
dst_ptr++;
}
}
dptr += dst_w;
}
}
@ -379,10 +372,6 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
buf = alloca(dst_clip_w * sizeof(DATA32));
for (y = 0; y < dst_clip_h; y++)
{
#ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
#endif
{
dst_ptr = buf;
for (x = 0; x < dst_clip_w; x++)
{
@ -392,7 +381,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
}
/* * blend here [clip_w *] buf -> dptr * */
func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
}
dptr += dst_w;
}
}

View File

@ -5,9 +5,6 @@
int *xp, xap, yap, pos;
//int dyy, dxx;
int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
@ -24,10 +21,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
@ -90,10 +83,7 @@
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
@ -111,10 +101,7 @@
while (dst_clip_h--)
{
pbuf = dptr;
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
@ -168,10 +155,6 @@
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
@ -184,10 +167,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
@ -243,10 +222,6 @@
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;

View File

@ -4,9 +4,6 @@
int a, r, g, b, rx, gx, bx, ax;
int xap, yap, pos;
//int dyy, dxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
DATA32 **yp;
int *xp;
@ -29,10 +26,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -139,10 +132,7 @@
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
@ -159,10 +149,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -256,10 +242,7 @@
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
@ -271,10 +254,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -369,10 +348,7 @@
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;

View File

@ -5,9 +5,6 @@
int *xp, xap, yap, pos;
//int dyy, dxx;
int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
@ -24,10 +21,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -91,10 +84,7 @@
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
@ -111,10 +101,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -170,10 +156,7 @@
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
@ -185,10 +168,6 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
@ -245,10 +224,7 @@
}
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

@ -3,9 +3,6 @@
RGBA_Gfx_Func func;
RGBA_Image *maskobj;
DATA8 *mask = NULL;
#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->mask.mask)
@ -25,16 +22,8 @@
// mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
ptr += src_w;
dst_ptr += dst_w;
mask += maskobj->cache_entry.w;
@ -44,15 +33,8 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
ptr += src_w;
dst_ptr += dst_w;
}

View File

@ -61,16 +61,9 @@
if (drh == srh)
{
int sxx0 = sxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
psrc = src->image.data + (src_w * (sry + cy)) + srx;
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
pbuf = buf; pbuf_end = buf + dst_clip_w;
sxx = sxx0;
#ifdef SCALE_USING_MMX
@ -107,10 +100,7 @@
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pdst += dst_w;
psrc += src_w;
buf += buf_step;
@ -121,16 +111,9 @@
else if (drw == srw)
{
DATA32 *ps = src->image.data + (src_w * sry) + srx + cx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
int ay;
sy = syy >> 16;
@ -167,10 +150,6 @@
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pdst += dst_w;
syy += dsyy;
buf += buf_step;
@ -181,16 +160,9 @@
{
DATA32 *ps = src->image.data + (src_w * sry) + srx;
int sxx0 = sxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
int ay;
sy = syy >> 16;
@ -252,10 +224,7 @@
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pdst += dst_w;
syy += dsyy;
buf += buf_step;

View File

@ -203,10 +203,6 @@ extern EAPI int _evas_log_dom_global;
# define THI(x) int x
# define TH_MAX 8
// even though in theory having every Nth rendered line done by a different
// thread might even out load across threads - it actually slows things down.
//#define EVAS_SLI 1
#else
# define TH(x)
# define THI(x)