[Pixman] [PATCH 7/7] test: Make image size calculation match COVER_CLIP definition again

Ben Avison bavison at riscosopen.org
Mon Aug 24 13:42:06 PDT 2015


Now that we don't need so many excess pixels to ensure both COVER_CLIP
fast path flags are set, remove the 8/65536ths of a pixel border used
when calculating how big to make the source image.
---
 test/affine-bench.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/test/affine-bench.c b/test/affine-bench.c
index 9e0121e..73e769b 100644
--- a/test/affine-bench.c
+++ b/test/affine-bench.c
@@ -396,13 +396,10 @@ main (int argc, char *argv[])
     }
 
     compute_transformed_extents (&binfo.transform, &dest_box, &transformed);
-    /* The source area is expanded by a tiny bit (8/65536th pixel)
-     * to match the calculation of the COVER_CLIP flags in analyze_extent()
-     */
-    xmin = pixman_fixed_to_int (transformed.x1 - 8 * pixman_fixed_e - pixman_fixed_1 / 2);
-    ymin = pixman_fixed_to_int (transformed.y1 - 8 * pixman_fixed_e - pixman_fixed_1 / 2);
-    xmax = pixman_fixed_to_int (transformed.x2 + 8 * pixman_fixed_e + pixman_fixed_1 / 2);
-    ymax = pixman_fixed_to_int (transformed.y2 + 8 * pixman_fixed_e + pixman_fixed_1 / 2);
+    xmin = pixman_fixed_to_int (transformed.x1 - pixman_fixed_1 / 2);
+    ymin = pixman_fixed_to_int (transformed.y1 - pixman_fixed_1 / 2);
+    xmax = pixman_fixed_to_int (transformed.x2 + pixman_fixed_1 / 2 - pixman_fixed_e);
+    ymax = pixman_fixed_to_int (transformed.y2 + pixman_fixed_1 / 2 - pixman_fixed_e);
     binfo.src_x = -xmin;
     binfo.src_y = -ymin;
 
-- 
1.7.5.4



More information about the Pixman mailing list