[PATCH pixman 09/13] pixman-filter: make IMPULSE+IMPULSE not produce blank image

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo,gmane.comp.graphics.pixman
Message-ID <[email protected]>
---
 pixman/pixman-filter.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index b656923..78ea72d 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -323,11 +323,13 @@ pixman_filter_create_separable_convolution (int             *n_values,
     int subsample_x, subsample_y;
     int width, height;
 
-    subsample_x = (1 << subsample_bits_x);
-    subsample_y = (1 << subsample_bits_y);
-
     width = filter_width (reconstruct_x, sample_x, sx);
+    if (width < 1) { width = 1; subsample_bits_x = 0; }
     height = filter_width (reconstruct_y, sample_y, sy);
+    if (height < 1) { height = 1; subsample_bits_y = 0; }
+
+    subsample_x = (1 << subsample_bits_x);
+    subsample_y = (1 << subsample_bits_y);
 
     *n_values = 4 + width * subsample_x + height * subsample_y;
 
-- 
1.7.9.5

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.