From eb5d30a9d3bfb1bddaf9e60e2092353fe6b1dd48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Thu, 30 Apr 2009 02:03:03 -0400 Subject: [PATCH] Get rid of SOURCE_IMAGE_CLASS_NEITHER again --- pixman/pixman-compose.c | 2 +- pixman/pixman-image.c | 13 +++++++------ pixman/pixman-private.h | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c index fbeb5ed..68b5683 100644 --- a/pixman/pixman-compose.c +++ b/pixman/pixman-compose.c @@ -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, diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 36a189a..819d29a 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -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 */ diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index c2b7e44..3049c7c 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -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, -- 2.7.4