diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-10-27 10:05:35 -0700 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-10-27 10:10:32 -0700 |
commit | ac9ac555551be0a607ad7b76531c2f80ea76d349 (patch) | |
tree | 70c8b22f3e314713da763127811b47d9d9138d29 | |
parent | 3013997e234d86dcdaa212c50d4b263c44a7c416 (diff) | |
download | gtk+-ac9ac555551be0a607ad7b76531c2f80ea76d349.tar.gz |
cairoblur: Fix the blur code
We weren't passing in the right "d" value, which was causing the blur to
behave incorrectly, especially in the case of 1px blurs, which would
cause no blurs at all.
The blur should now match the web.
-rw-r--r-- | gtk/gtkcairoblur.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkcairoblur.c b/gtk/gtkcairoblur.c index b3f14db5b2..4e03a7f2eb 100644 --- a/gtk/gtkcairoblur.c +++ b/gtk/gtkcairoblur.c @@ -147,6 +147,7 @@ _boxblur (guchar *buffer, int radius) { guchar *flipped_buffer; + int d = _gtk_cairo_blur_compute_pixels (radius); flipped_buffer = g_malloc (width * height); @@ -154,13 +155,13 @@ _boxblur (guchar *buffer, flip_buffer (flipped_buffer, buffer, width, height); /* Step 2: blur rows (really columns) */ - blur_rows (flipped_buffer, buffer, height, width, radius); + blur_rows (flipped_buffer, buffer, height, width, d); /* Step 3: swap rows and columns */ flip_buffer (buffer, flipped_buffer, height, width); /* Step 4: blur rows */ - blur_rows (buffer, flipped_buffer, width, height, radius); + blur_rows (buffer, flipped_buffer, width, height, d); g_free (flipped_buffer); } |