forked from old/legacy-imlib2
unrolled span rendering a little more (switch stamement is now just once
per span 0 thats good enough.... :) ) SVN revision: 3491
This commit is contained in:
parent
6cedec71a8
commit
77a68dc413
|
@ -1939,30 +1939,49 @@ span(ImlibImage * im, int y, edgeRec * pt1, edgeRec * pt2, DATA8 r, DATA8 g,
|
|||
if (ix1 == ix2)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
p = &(im->data[(im->w * y) + ix1]);
|
||||
switch (op)
|
||||
{
|
||||
/* unrolled loop - on loop inside each render mode per span */
|
||||
case OP_RESHADE:
|
||||
do
|
||||
{
|
||||
BLEND_RE(r, g, b, a, p);
|
||||
p++;
|
||||
ix1++;
|
||||
}
|
||||
while (ix1 < ix2);
|
||||
break;
|
||||
case OP_SUBTRACT:
|
||||
do
|
||||
{
|
||||
BLEND_SUB(r, g, b, a, p);
|
||||
p++;
|
||||
ix1++;
|
||||
}
|
||||
while (ix1 < ix2);
|
||||
break;
|
||||
case OP_ADD:
|
||||
do
|
||||
{
|
||||
BLEND_ADD(r, g, b, a, p);
|
||||
p++;
|
||||
ix1++;
|
||||
}
|
||||
while (ix1 < ix2);
|
||||
break;
|
||||
case OP_COPY:
|
||||
do
|
||||
{
|
||||
BLEND(r, g, b, a, p);
|
||||
p++;
|
||||
ix1++;
|
||||
}
|
||||
while (ix1 < ix2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ix1++;
|
||||
}
|
||||
while (ix1 < ix2);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue