[Pixman] [PATCH 07/15] pixman-filter: Speed up the BOX+BOX filter

spitzak at gmail.com spitzak at gmail.com
Sat Dec 12 10:06:36 PST 2015


From: Bill Spitzak <spitzak at gmail.com>

This is easy as the caller already intersected the two boxes, so
the width is the integral.
---
 pixman/pixman-filter.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 4aafa51..782f73d 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -182,6 +182,11 @@ integral (pixman_kernel_t reconstruct, double x1,
 	assert (width == 0.0);
 	return filters[sample].func (x2 / scale);
     }
+    else if (reconstruct == PIXMAN_KERNEL_BOX && sample == PIXMAN_KERNEL_BOX)
+    {
+	assert (width <= 1.0);
+	return width;
+    }
     else if (sample == PIXMAN_KERNEL_IMPULSE)
     {
 	assert (width == 0.0);
-- 
1.9.1



More information about the Pixman mailing list