[Pixman] [PATCH 2/3] Move generated affine fetchers into pixman-fast-path.c

Søren Sandmann sandmann at cs.au.dk
Wed Oct 2 14:55:50 PDT 2013


Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:

> On Wed, 18 Sep 2013 19:40:33 -0400
> Søren Sandmann Pedersen <sandmann at cs.au.dk> wrote:
>
>> From: Søren Sandmann Pedersen <ssp at redhat.com>
>> 
>> The generated fetchers for NEAREST, BILINEAR, and
>> SEPARABLE_CONVOLUTION filters are fast paths and so they belong in
>> pixman-fast-path.c
>
> Just wondered why the performance improvements from
>    http://lists.freedesktop.org/archives/pixman/2013-October/003019.html
> did not seem to agree with the earlier profiling reports at
>    http://lists.freedesktop.org/archives/pixman/2013-October/003013.html
> (the profiling was done with a little bit stale build of pixman).
>
> This "Move generated affine fetchers into pixman-fast-path.c" commit
> appears to have introduced a performance regression:

Looks like I got the image and iter flags swapped.


Thanks,
Søren



>From e61900880ec86bc63235b30cf06e7ec2217190b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <ssp at redhat.com>
Date: Wed, 2 Oct 2013 17:51:36 -0400
Subject: [PATCH] fast: Swap image and iter flags in generated fast paths

The generated fast paths that were moved into the 'fast'
implementation in ec0e38cbb746a673f8e989ab8eae356c8c77dac7 had their
image and iter flag arguments swapped; as a result, none of the fast
paths were ever called.
---
 pixman/pixman-fast-path.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index b06d1b2..c6e43de 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -3236,22 +3236,22 @@ static const pixman_iter_info_t fast_iters[] =
     
 #define SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat)   \
     { PIXMAN_ ## format,						\
-      ITER_NARROW | ITER_SRC,						\
       GENERAL_SEPARABLE_CONVOLUTION_FLAGS | FAST_PATH_ ## repeat ## _REPEAT, \
+      ITER_NARROW | ITER_SRC,						\
       NULL, bits_image_fetch_separable_convolution_affine_ ## name, NULL \
     },
 
 #define BILINEAR_AFFINE_FAST_PATH(name, format, repeat)			\
     { PIXMAN_ ## format,						\
-      ITER_NARROW | ITER_SRC,						\
       GENERAL_BILINEAR_FLAGS | FAST_PATH_ ## repeat ## _REPEAT,		\
+      ITER_NARROW | ITER_SRC,						\
       NULL, bits_image_fetch_bilinear_affine_ ## name, NULL,		\
     },
 
 #define NEAREST_AFFINE_FAST_PATH(name, format, repeat)			\
     { PIXMAN_ ## format,						\
-      ITER_NARROW | ITER_SRC,						\
       GENERAL_NEAREST_FLAGS | FAST_PATH_ ## repeat ## _REPEAT,		\
+      ITER_NARROW | ITER_SRC,						\
       NULL, bits_image_fetch_nearest_affine_ ## name, NULL		\
     },
 
-- 
1.7.11.7



More information about the Pixman mailing list