mirror of https://github.com/GNOME/gimp.git
replaced binary operations with a naive but faster implementation using a
2005-09-28 Sven Neumann <sven@gimp.org> * app/paint-funcs/paint-funcs-generic.h (swap_pixels): replaced binary operations with a naive but faster implementation using a local variable. * app/composite/gimp-composite-generic.c (gimp_composite_swap_any_any_any_generic): same change here.
This commit is contained in:
parent
8c9e9140c0
commit
f478549bf1
|
@ -1,8 +1,11 @@
|
|||
2005-09-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/paint-funcs/paint-funcs-generic.h (swap_pixels): replaced
|
||||
the binary XOR operations with a naive but faster implementation
|
||||
using a local variable.
|
||||
binary operations with a naive but faster implementation using a
|
||||
local variable.
|
||||
|
||||
* app/composite/gimp-composite-generic.c
|
||||
(gimp_composite_swap_any_any_any_generic): same change here.
|
||||
|
||||
2005-09-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
|
|
|
@ -1318,17 +1318,18 @@ gimp_composite_replace_any_any_any_generic (GimpCompositeContext *ctx)
|
|||
void
|
||||
gimp_composite_swap_any_any_any_generic (GimpCompositeContext * ctx)
|
||||
{
|
||||
guint length;
|
||||
guchar *src = ctx->A;
|
||||
guchar *dest = ctx->B;
|
||||
guint bytes1 = gimp_composite_pixel_bpp[ctx->pixelformat_A];
|
||||
length = ctx->n_pixels * bytes1;
|
||||
guint length = ctx->n_pixels * bytes1;
|
||||
|
||||
while (length--)
|
||||
{
|
||||
*src = *src ^ *dest;
|
||||
*dest = *dest ^ *src;
|
||||
*src = *src ^ *dest;
|
||||
guchar tmp = *dest;
|
||||
|
||||
*dest = *src;
|
||||
*src = tmp;
|
||||
|
||||
src++;
|
||||
dest++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue