Get rid of SOURCE_IMAGE_CLASS_NEITHER again
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Thu, 30 Apr 2009 06:03:03 +0000 (02:03 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Mon, 4 May 2009 22:55:04 +0000 (18:55 -0400)
pixman/pixman-compose.c
pixman/pixman-image.c
pixman/pixman-private.h

index fbeb5ed..68b5683 100644 (file)
@@ -190,7 +190,7 @@ PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
                                       data->xSrc, data->ySrc,
                                       data->width, data->height);
 
-    maskClass = SOURCE_IMAGE_CLASS_NEITHER;
+    maskClass = SOURCE_IMAGE_CLASS_UNKNOWN;
     if (data->mask)
     {
        maskClass = _pixman_image_classify (data->mask,
index 36a189a..819d29a 100644 (file)
@@ -41,10 +41,7 @@ SourcePictureClassify (pixman_image_t *image,
 {
     source_image_t *pict = &image->source;
     
-    if (pict->class != SOURCE_IMAGE_CLASS_UNKNOWN)
-       return pict->class;
-
-    pict->class = SOURCE_IMAGE_CLASS_NEITHER;
+    pict->class = SOURCE_IMAGE_CLASS_UNKNOWN;
     
     if (pict->common.type == SOLID)
     {
@@ -84,7 +81,10 @@ SourcePictureClassify (pixman_image_t *image,
            if (pict->common.transform)
            {
                if (!pixman_transform_point_3d (pict->common.transform, &v))
-                   return SOURCE_IMAGE_CLASS_UNKNOWN;
+               {
+                   pict->class = SOURCE_IMAGE_CLASS_UNKNOWN;
+                   goto out;
+               }
            }
 
            factors[i] = ((a * v.vector[0] + b * v.vector[1]) >> 16) + off;
@@ -96,6 +96,7 @@ SourcePictureClassify (pixman_image_t *image,
            pict->class = SOURCE_IMAGE_CLASS_VERTICAL;
     }
 
+out:
     return pict->class;
 }
 
@@ -179,7 +180,7 @@ _pixman_image_classify (pixman_image_t *image,
     if (image->common.classify)
        return image->common.classify (image, x, y, width, height);
     else
-       return SOURCE_IMAGE_CLASS_NEITHER;
+       return SOURCE_IMAGE_CLASS_UNKNOWN;
 }
 
 /* Ref Counting */
index c2b7e44..3049c7c 100644 (file)
@@ -281,7 +281,6 @@ typedef enum
     SOURCE_IMAGE_CLASS_UNKNOWN,
     SOURCE_IMAGE_CLASS_HORIZONTAL,
     SOURCE_IMAGE_CLASS_VERTICAL,
-    SOURCE_IMAGE_CLASS_NEITHER
 } source_pict_class_t;
 
 typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,