| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
clang complains that the expression involving sqrt() is not
constant, and thus refuses to accept it as a case label. So,
use precomputed values instead.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
|
|
|
|
|
|
|
|
| |
There is no need to e.g. blur in the x-direction for the top part
of a box shadow. Also, there is no need to extend the mask in the
non-blurred direction.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
|
|
|
|
|
|
|
|
|
|
|
|
| |
For radius 1px the current implementation rounds down to a 1 px box
filter which is a no-op. Rather than creating useless shadow masks
in this case we bail out blurring early.
Another alternative would be to make radius 1px round up to a 2 px box
filter, but that would change the rendering of Adwaita which is probably
not a great idea this late in the cycle.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This unrolls the inner blur loop for radius 1-10, allowing
the compiler to use a divide-by-constant operation instead
of a generic division.
Here is the blur-performance output before:
Radius 1: 124.95 msec, 32.01 kpixels/msec:
Radius 2: 117.27 msec, 34.11 kpixels/msec:
Radius 3: 123.57 msec, 32.37 kpixels/msec:
Radius 4: 118.17 msec, 33.85 kpixels/msec:
Radius 5: 119.32 msec, 33.52 kpixels/msec:
Radius 6: 124.17 msec, 32.21 kpixels/msec:
Radius 7: 121.04 msec, 33.05 kpixels/msec:
Radius 8: 130.64 msec, 30.62 kpixels/msec:
Radius 9: 119.47 msec, 33.48 kpixels/msec:
Radius 10: 117.95 msec, 33.91 kpixels/msec:
Radius 11: 122.38 msec, 32.68 kpixels/msec:
Radius 12: 121.92 msec, 32.81 kpixels/msec:
Radius 13: 125.45 msec, 31.89 kpixels/msec:
Radius 14: 121.63 msec, 32.89 kpixels/msec:
Radius 15: 120.18 msec, 33.28 kpixels/msec:
And after:
Radius 1: 42.26 msec, 94.65 kpixels/msec:
Radius 2: 59.15 msec, 67.62 kpixels/msec:
Radius 3: 60.29 msec, 66.35 kpixels/msec:
Radius 4: 64.53 msec, 61.99 kpixels/msec:
Radius 5: 60.07 msec, 66.59 kpixels/msec:
Radius 6: 62.43 msec, 64.07 kpixels/msec:
Radius 7: 60.36 msec, 66.27 kpixels/msec:
Radius 8: 59.59 msec, 67.13 kpixels/msec:
Radius 9: 76.17 msec, 52.51 kpixels/msec:
Radius 10: 79.41 msec, 50.37 kpixels/msec:
Radius 11: 118.92 msec, 33.64 kpixels/msec:
Radius 12: 121.31 msec, 32.97 kpixels/msec:
Radius 13: 118.30 msec, 33.81 kpixels/msec:
Radius 14: 116.82 msec, 34.24 kpixels/msec:
Radius 15: 116.99 msec, 34.19 kpixels/msec:
I.e. almost double performance for the unrolled radius values.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
|
|
|
|
|
|
|
| |
This just moves get_box_filter_size to the top and makes
it a macro (so it can be used as a constant later).
https://bugzilla.gnome.org/show_bug.cgi?id=746468
|
| |
|
|
|
|
|
|
|
|
| |
The differences between the mutter and GTK+ code are subtle, but it
turns out that _gtk_cairo_blur_compute_pixels actually returns the
shadow *spread*. Since we use a triple box blur, the constant was
multiplied by 1.5 to approximate three chained box blurs. Split this
out and use the correct value for the lobe width.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Both Owen Taylor and I, the originators of this code, allow the code
herein be relicensed to the LGPL, which is what GTK+ ships with. This
prevents GTK+ from being GPL-only.
|
|
|
|
|
|
| |
One factual pointed out in the review in
https://bugzilla.gnome.org/show_bug.cgi?id=734053, plus some
formatting nit picks.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=734053
|
|
|
|
| |
This is considerably faster to draw and paint.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
https://bugzilla.gnome.org/show_bug.cgi?id=723159
|
| |
|
| |
|
|
|
|
| |
It's always the same code, so there's no need for switch statements.
|
|
|
|
|
|
| |
The code accesses pixels in a chunks of 4 bytes, so we must only support
formats where the size of a single pixel is 4 bytes.
Fix RGB24 to be 4 bytes (the alpha channel is ignored) and disallow A8.
|
|
|
|
| |
It's only ever used like that
|
|
|