forked from old/legacy-imlib2
now that was bad! fix update appending :)
SVN revision: 2446
This commit is contained in:
parent
c502563a65
commit
62782c973c
|
@ -19,7 +19,8 @@ libImlib2_la_SOURCES = rend.c ximage.c scale.c rgba.c image.c color.c grab.c \
|
|||
Imlib2.h image.h scale.h blend.h context.h updates.h \
|
||||
color.h draw.h rend.h ximage.h colormod.h file.h \
|
||||
rgba.h common.h grab.h rgbadraw.h font.h format.h \
|
||||
rotate.h grad.h
|
||||
rotate.h grad.h \
|
||||
asm_blend.S
|
||||
libImlib2_la_LIBADD = @DLLDFLAGS@ $(top_builddir)/libltdl/libltdlc.la \
|
||||
-lX11 -lXext -lttf $(LDFLAGS)
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
|
|
@ -1259,16 +1259,16 @@ imlib_updates_append_updates(Imlib_Updates updates,
|
|||
return (Imlib_Updates)u;
|
||||
if (!u)
|
||||
return (Imlib_Updates)uu;
|
||||
while(u)
|
||||
while (u)
|
||||
{
|
||||
if (!u->next)
|
||||
if (!(u->next))
|
||||
{
|
||||
u->next = uu;
|
||||
return u;
|
||||
return updates;
|
||||
}
|
||||
u = u->next;
|
||||
}
|
||||
return u;
|
||||
return (Imlib_Updates)u;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
36
src/blend.c
36
src/blend.c
|
@ -62,29 +62,41 @@
|
|||
|
||||
/* COPY OPS */
|
||||
|
||||
static DATA8 mmx_data[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, /* zero */
|
||||
255,0, 0, 0, 0, 0, 0, 0, /* mask_red */
|
||||
0, 0,255, 0, 0, 0, 0, 0, /* mask_green */
|
||||
0, 0, 0, 0, 255,0, 0, 0, /* mask_blue */
|
||||
0, 0, 0, 255,0, 0, 0, 0, /* mask_alpha */
|
||||
255,255,255,255,255,255,0, 0 /* mask */
|
||||
};
|
||||
|
||||
static void
|
||||
__imlib_BlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm)
|
||||
{
|
||||
#if 1
|
||||
int y;
|
||||
|
||||
__imlib_toggle_mmx();
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
__imlib_asm_blend_rgba_to_rgb(src, dst, w, mmx_data);
|
||||
src += w + src_jump;
|
||||
dst += w + dst_jump;
|
||||
}
|
||||
__imlib_toggle_mmx();
|
||||
#else
|
||||
LOOP_START_2
|
||||
|
||||
#if 0
|
||||
__asm__ __volatile__(
|
||||
"punpcklbw (%0), %%mm7\n" /* move source pixel to mm7 */
|
||||
"pmovq %%mm7, %%mm6\n" /* copy source pixel to mm6 */
|
||||
"\n" /* move alpha byte to lower byte */
|
||||
"\n" /* multiply ... */
|
||||
: :
|
||||
"r" (p1),
|
||||
"r" (p2)
|
||||
};
|
||||
#else
|
||||
a = A_VAL(p1);
|
||||
BLEND_COLOR(a, R_VAL(p2), R_VAL(p1), R_VAL(p2));
|
||||
BLEND_COLOR(a, G_VAL(p2), G_VAL(p1), G_VAL(p2));
|
||||
BLEND_COLOR(a, B_VAL(p2), B_VAL(p1), B_VAL(p2));
|
||||
#endif
|
||||
|
||||
LOOP_END_WITH_INCREMENT
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -41,7 +41,10 @@ __imlib_MergeUpdate(ImlibUpdate *u, int w, int h, int hgapmax)
|
|||
if (!u->next)
|
||||
{
|
||||
CLIP(u->x, u->y, u->w, u->h, 0, 0, w, h);
|
||||
return u;
|
||||
if ((u->w > 0) && (u->h > 0))
|
||||
return u;
|
||||
__imlib_FreeUpdates(u);
|
||||
return NULL;
|
||||
}
|
||||
tw = w >> TB;
|
||||
if (w & TM)
|
||||
|
|
Loading…
Reference in New Issue