Lionel Landwerlin 318283fc70 st: optimize box-shadow rendering
Currently the box-shadow is rendering is done like this :

The first time we want to render a node that requires a box-shadow, St
creates an cogl offscreen surface of the size of the allocation and
renders the box into this offscreen buffer using modulation on the
alpha channel, this buffer is then blurred according to the CSS
parameters.

The problem with this method is that every time an StWidget is
resized, its box-shadow offscreen buffer has to be resized and
therefore rendered and blurred.

This patches propose an optimization for this use case by rendering
the box-shadow only once but at a size that is independent of the
StWidget's size. Then every time we need to paint this box-shadow, we
just render this offscreen buffer using a 9-slices.

This method only works when the allocation of the widget is bigger
than the minimum shadow size on which we can apply a 9-slices, that is
given my the radius of the corners. If the allocation is smaller than
this minimum size, we then fallback to the fully render/blur the
shadow (like before this patch).

https://bugzilla.gnome.org/show_bug.cgi?id=689858
2013-07-09 11:24:26 +01:00
..
2013-07-01 13:20:02 -04:00
2013-07-09 11:24:26 +01:00
2012-01-25 19:03:13 -05:00
2013-06-07 19:52:10 +02:00
2012-12-05 23:35:35 +01:00
2012-01-25 19:03:13 -05:00
2013-05-13 18:38:35 -04:00
2011-11-07 15:24:59 -05:00
2012-02-28 08:14:06 -05:00
2010-02-22 19:37:49 -05:00
2012-09-10 21:23:25 +02:00
2012-02-28 08:14:06 -05:00