[gnome-shell] St: Fix blur radius computation to correspond to current CSS draft



commit 281b2e9b0ec47d3f513b8cc847a31fdf8505bac8
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Oct 18 17:30:52 2010 -0400

    St: Fix blur radius computation to correspond to current CSS draft
    
    The next draft of the CSS Backgrounds and Borders module will actually
    define when the blur radius means. Fix our code to use that definition
    (2 * standard deviation) rather than using the 1.9 * that we extracted
    from what Mozilla was doing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632506

 src/st/st-private.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/st/st-private.c b/src/st/st-private.c
index f97c2de..d0aa89b 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -435,11 +435,12 @@ blur_pixels (guchar  *pixels_in,
   guchar *pixels_out;
   float   sigma;
 
-  /* we use an approximation of the sigma - blur radius relationship used
-     in Firefox for doing SVG blurs; see
-     http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/src/gfxBlur.cpp#280
-  */
-  sigma = blur / 1.9;
+  /* The CSS specification defines (or will define) the blur radius as twice
+   * the Gaussian standard deviation. See:
+   *
+   * http://lists.w3.org/Archives/Public/www-style/2010Sep/0002.html
+   */
+  sigma = blur / 2.;
 
   if ((guint) blur == 0)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]