summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2010-02-14 18:55:27 -0500
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-03-14 12:59:37 -0400
commit9ae66f9a5670ccdbac70fdbf6ed761d3df21ecd6 (patch)
tree5152a49616d1717548186eca134a2bfe9b56d50a
parentb273dd11a5164ef1c5f61ee74b0aee26df62d49c (diff)
Add a new FAST_PATH_BILINEAR_FITLER flag.
Use it in pixman-bits-image.c to test that the image has a bilinear filter before using the fast scaled fetcher.
-rw-r--r--pixman/pixman-bits-image.c6
-rw-r--r--pixman/pixman-image.c6
-rw-r--r--pixman/pixman-private.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 3d78ff07..33d66db3 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -911,12 +911,10 @@ bits_image_property_changed (pixman_image_t *image)
else if (bits->common.transform &&
bits->common.transform->matrix[2][0] == 0 &&
bits->common.transform->matrix[2][1] == 0 &&
+ bits->common.transform->matrix[1][0] == 0 &&
bits->common.transform->matrix[2][2] == pixman_fixed_1 &&
bits->common.transform->matrix[0][0] > 0 &&
- bits->common.transform->matrix[1][0] == 0 &&
- (bits->common.filter == PIXMAN_FILTER_BILINEAR ||
- bits->common.filter == PIXMAN_FILTER_GOOD ||
- bits->common.filter == PIXMAN_FILTER_BEST) &&
+ (bits->common.flags & FAST_PATH_BILINEAR_FILTER) != 0 &&
bits->common.repeat == PIXMAN_REPEAT_NONE &&
(bits->format == PIXMAN_a8r8g8b8 ||
bits->format == PIXMAN_x8r8g8b8))
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index d09d1930..45a86463 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -324,6 +324,12 @@ compute_image_info (pixman_image_t *image)
flags |= (FAST_PATH_NEAREST_FILTER | FAST_PATH_NO_CONVOLUTION_FILTER);
break;
+ case PIXMAN_FILTER_BILINEAR:
+ case PIXMAN_FILTER_GOOD:
+ case PIXMAN_FILTER_BEST:
+ flags |= (FAST_PATH_BILINEAR_FILTER | FAST_PATH_NO_CONVOLUTION_FILTER);
+ break;
+
case PIXMAN_FILTER_CONVOLUTION:
break;
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 9dcdca78..0bcce8d6 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -579,6 +579,7 @@ _pixman_choose_implementation (void);
#define FAST_PATH_SIMPLE_REPEAT (1 << 12)
#define FAST_PATH_IS_OPAQUE (1 << 13)
#define FAST_PATH_NEEDS_WORKAROUND (1 << 14)
+#define FAST_PATH_BILINEAR_FILTER (1 << 15)
#define _FAST_PATH_STANDARD_FLAGS \
(FAST_PATH_ID_TRANSFORM | \