[Pixman] [PATCH 3/7] Split FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR flag
Ben Avison
bavison at riscosopen.org
Mon Aug 24 13:42:02 PDT 2015
This patch introduces a new flag with the meaning of the old
FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR flag. It is intended for temporary
use, and permits us to move over to its new definition via a series of
patches addressing differing parts of the source code.
---
pixman/pixman-fast-path.c | 2 +-
pixman/pixman-inlines.h | 6 +++---
pixman/pixman-private.h | 1 +
pixman/pixman-ssse3.c | 2 +-
pixman/pixman.c | 4 ++--
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 53d4a1f..02bbc5a 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -3187,7 +3187,7 @@ static const pixman_iter_info_t fast_iters[] =
(FAST_PATH_STANDARD_FLAGS |
FAST_PATH_SCALE_TRANSFORM |
FAST_PATH_BILINEAR_FILTER |
- FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR),
+ FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX),
ITER_NARROW | ITER_SRC,
fast_bilinear_cover_iter_init,
NULL, NULL
diff --git a/pixman/pixman-inlines.h b/pixman/pixman-inlines.h
index 1c8441d..c3324cf 100644
--- a/pixman/pixman-inlines.h
+++ b/pixman/pixman-inlines.h
@@ -1217,7 +1217,7 @@ fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp,
#define SIMPLE_BILINEAR_FAST_PATH_COVER(op,s,d,func) \
{ PIXMAN_OP_ ## op, \
PIXMAN_ ## s, \
- SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR, \
+ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX, \
PIXMAN_null, 0, \
PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \
fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \
@@ -1259,7 +1259,7 @@ fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp,
#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH_COVER(op,s,d,func) \
{ PIXMAN_OP_ ## op, \
PIXMAN_ ## s, \
- SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR, \
+ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX, \
PIXMAN_a8, MASK_FLAGS (a8, FAST_PATH_UNIFIED_ALPHA), \
PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \
fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \
@@ -1301,7 +1301,7 @@ fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp,
#define SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_COVER(op,s,d,func) \
{ PIXMAN_OP_ ## op, \
PIXMAN_ ## s, \
- SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR, \
+ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX, \
PIXMAN_solid, MASK_FLAGS (solid, FAST_PATH_UNIFIED_ALPHA), \
PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \
fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 73108a0..c593373 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -701,6 +701,7 @@ _pixman_iter_init_bits_stride (pixman_iter_t *iter, const pixman_iter_info_t *in
#define FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR (1 << 24)
#define FAST_PATH_BITS_IMAGE (1 << 25)
#define FAST_PATH_SEPARABLE_CONVOLUTION_FILTER (1 << 26)
+#define FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX (1 << 27)
#define FAST_PATH_PAD_REPEAT \
(FAST_PATH_NO_NONE_REPEAT | \
diff --git a/pixman/pixman-ssse3.c b/pixman/pixman-ssse3.c
index 680d6b9..8a94055 100644
--- a/pixman/pixman-ssse3.c
+++ b/pixman/pixman-ssse3.c
@@ -325,7 +325,7 @@ static const pixman_iter_info_t ssse3_iters[] =
(FAST_PATH_STANDARD_FLAGS |
FAST_PATH_SCALE_TRANSFORM |
FAST_PATH_BILINEAR_FILTER |
- FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR),
+ FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX),
ITER_NARROW | ITER_SRC,
ssse3_bilinear_cover_iter_init,
NULL, NULL
diff --git a/pixman/pixman.c b/pixman/pixman.c
index e8290d9..22205a3 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -512,7 +512,7 @@ analyze_extent (pixman_image_t *image,
pixman_fixed_to_int (transformed.x2 + pixman_fixed_1 / 2 + 8 * pixman_fixed_e) < image->bits.width &&
pixman_fixed_to_int (transformed.y2 + pixman_fixed_1 / 2 + 8 * pixman_fixed_e) < image->bits.height)
{
- *flags |= FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR;
+ *flags |= FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX;
}
}
@@ -652,7 +652,7 @@ pixman_image_composite32 (pixman_op_t op,
FAST_PATH_SAMPLES_COVER_CLIP_NEAREST)
#define BILINEAR_OPAQUE (FAST_PATH_SAMPLES_OPAQUE | \
FAST_PATH_BILINEAR_FILTER | \
- FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR)
+ FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR_APPROX)
if ((info.src_flags & NEAREST_OPAQUE) == NEAREST_OPAQUE ||
(info.src_flags & BILINEAR_OPAQUE) == BILINEAR_OPAQUE)
--
1.7.5.4
More information about the Pixman
mailing list