remove invert operator
authorBenjamin Otte <otte@gnome.org>
Wed, 12 Nov 2008 18:12:12 +0000 (19:12 +0100)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 23 Jun 2009 18:42:34 +0000 (14:42 -0400)
src INVERT dest == (white IN src) DIFFERENCE dest

pixman/pixman-combine.c.template
pixman/pixman.h

index 6838840..45f8313 100644 (file)
@@ -666,27 +666,6 @@ fbCombineSubtractU (pixman_implementation_t *imp, pixman_op_t op,
 #undef Subtract
 }
 
-static FASTCALL void
-fbCombineInvertU (pixman_implementation_t *imp, pixman_op_t op,
-                 comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-      comp4_t inv, d, s;
-      comp1_t a, ia;
-
-      d = *(dest + i);
-      s = combineMask (src, mask, i);
-      a = Alpha (s);
-      inv = ~d | A_MASK;
-      ia = ~a;
-
-      FbByteAddMul (inv, a, d, ia);
-      *(dest + i) = inv;
-    }
-}
-
 #define Min(c) (c[0] < c[1] ? (c[0] < c[2] ? c[0] : c[2]) : (c[1] < c[2] ? c[1] : c[2]))
 #define Max(c) (c[0] > c[1] ? (c[0] > c[2] ? c[0] : c[2]) : (c[1] > c[2] ? c[1] : c[2]))
 #define Lum(c) ((c[0] * 30 + c[1] * 59 + c[2] * 11) / 100)
@@ -1948,7 +1927,6 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
     imp->combine_width[PIXMAN_OP_DIFFERENCE] = fbCombineDifferenceU;
     imp->combine_width[PIXMAN_OP_EXCLUSION] = fbCombineExclusionU;
     imp->combine_width[PIXMAN_OP_SUBTRACT] = fbCombineSubtractU;
-    imp->combine_width[PIXMAN_OP_INVERT] = fbCombineInvertU;
     imp->combine_width[PIXMAN_OP_HUE] = fbCombineHSLHueU;
     imp->combine_width[PIXMAN_OP_SATURATION] = fbCombineHSLSaturationU;
     imp->combine_width[PIXMAN_OP_COLOR] = fbCombineHSLColorU;
index c3a1ac3..9f36386 100644 (file)
@@ -380,11 +380,10 @@ typedef enum
     PIXMAN_OP_DIFFERENCE                = 0x39,
     PIXMAN_OP_EXCLUSION                 = 0x3a,
     PIXMAN_OP_SUBTRACT                 = 0x3b,
-    PIXMAN_OP_INVERT                   = 0x3c,
-    PIXMAN_OP_HUE                      = 0x3d,
-    PIXMAN_OP_SATURATION               = 0x3e,
-    PIXMAN_OP_COLOR                    = 0x3f,
-    PIXMAN_OP_LUMINOSITY               = 0x40,
+    PIXMAN_OP_HUE                      = 0x3c,
+    PIXMAN_OP_SATURATION               = 0x3d,
+    PIXMAN_OP_COLOR                    = 0x3e,
+    PIXMAN_OP_LUMINOSITY               = 0x4f,
 
     PIXMAN_OP_NONE,
     PIXMAN_OP_LAST = PIXMAN_OP_NONE