pixman-filter: reduce amount of malloc/free/memcpy to generate filter
authorBill Spitzak <spitzak@gmail.com>
Wed, 31 Aug 2016 05:03:09 +0000 (22:03 -0700)
committerSøren Sandmann Pedersen <soren.sandmann@gmail.com>
Fri, 2 Sep 2016 04:40:12 +0000 (00:40 -0400)
commit6acaf2bcb1246529143c112dbce6dd9d6f7cb51e
tree9492d476710db2cb2e0d5d1f6e9caf4173504f78
parentd0e6c9f4f65e429058b97d2f947b048b445c17c4
pixman-filter: reduce amount of malloc/free/memcpy to generate filter

Rearranged so that the entire block of memory for the filter pair
is allocated first, and then filled in. Previous version allocated
and freed two temporary buffers for each filter and did an extra
memcpy.

v8: small refactor to remove the filter_width function

v10: Restored filter_width function but with arguments changed to
     match later patches

v11: Removed unused arg and pointer from filter_width function
     Whitespace fixes.

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Acked-by: Søren Sandmann <soren.sandmann@gmail.com>
pixman/pixman-filter.c