After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723159 - CSD shadows are clipped
CSD shadows are clipped
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-01-28 11:10 UTC by lamefun
Modified: 2014-02-05 09:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of clipped shadows (1.72 KB, image/png)
2014-01-28 11:10 UTC, lamefun
  Details
css: Fix computation of pixels occupied by blur radius (4.58 KB, patch)
2014-02-03 14:59 UTC, Benjamin Otte (Company)
committed Details | Review
css: Fix the fix of blur clip radius (4.04 KB, patch)
2014-02-05 09:06 UTC, lamefun
none Details | Review

Description lamefun 2014-01-28 11:10:16 UTC
Created attachment 267392 [details]
Screenshot of clipped shadows

It looks like GTK+ renders bigger shadows than specified in CSS box-shadow radius. If I add radius += 10 in _gtk_css_shadows_value_get_extents, the shadows are drawn OK.
Comment 1 Benjamin Otte (Company) 2014-02-03 14:59:19 UTC
Created attachment 267959 [details] [review]
css: Fix computation of pixels occupied by blur radius

These computations were done randomly in lots of places and more often
than not, they were also wrong.
This function was copied (with docs) from Firefox:
  http://lxr.mozilla.org/mozilla-central/source/gfx/2d/Blur.cpp
Comment 2 Benjamin Otte (Company) 2014-02-03 20:38:54 UTC
Attachment 267959 [details] pushed as e9fb8ad - css: Fix computation of pixels occupied by blur radius
Comment 3 lamefun 2014-02-05 08:34:43 UTC
Review of attachment 267959 [details] [review]:

(3 * sqrt(2 * pi) / 4) * 1.5 = 2.8 - that's way too much, 2 should be enough (I've tried it with pure black shadow of radiuses 12 and 64). The blur algorithm in GTK+ isn't a triple box blur at all.
Comment 4 lamefun 2014-02-05 09:06:45 UTC
Created attachment 268136 [details] [review]
css: Fix the fix of blur clip radius