/***********************************************-*-C-*-**********/
/* Overlay mode: Logical Xor */

BLEND_ALGEBRA_INIT

COLORSPACE_RGB
PARALLEL_SAFE
REQUIRE_TRACKS(2)

BLEND_ALGEBRA_PROC

#define s 1
#define d 0

R_OUT = R(s) * (1-A(d)) + R(d) * (1-A(s));
G_OUT = G(s) * (1-A(d)) + G(d) * (1-A(s));
B_OUT = B(s) * (1-A(d)) + B(d) * (1-A(s));

if (HAS_ALPHA) A_OUT = A(s) + A(d) - 2 * A(s) * A(d);
else A_OUT = 1;

BLEND_ALGEBRA_END
