Summary:
Add some const & for things that return const & so there's no need to make a copy
Add a std::move for a thing that we pass by copy and it's just saved in another variable
Reviewers: zzag
Reviewed By: zzag
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24614
Summary:
Creation of shadows (especially for "Large" and "Very large" sizes) is
a computation expensive task because we have to blur alpha channel of a
shadow texture (which then will be tinted with desired shadow color).
Currently, we use the following approach:
* for blur radius less than 64, use naive 2-pass algorithm;
* for blur radius greater than or equal to 64, use FFT.
Even though the FFT approach is doing its the best, it still takes
impresive amount of time to blur the alpha channel.
What makes things even worse is that while we're blurring the alpha
channel, we're blocking the main thread of KWin (decorations are not
rendered in their own thread). This can result in frame drops (2 or 3
frames, something like that).
So, the only viable alternative is to use an approximation of the Gaussian
blur. As such an approximation, I picked the box blur because it's quite
simple, it's fast, and it takes small amount of iterations to have something
similar to the true Gaussian blur.
In general, there are no big differences between true gaussian shadows
and approximated shadows:
Before:
{F6312610}
After:
{F6312613}
Before:
{F6280935}
After:
{F6312608}
As a win, it takes much less time to generate decoration shadows.
Reviewers: #kwin, #plasma, #breeze, #vdg, ngraham
Reviewed By: #breeze, #vdg, ngraham
Subscribers: cfeck, ngraham, abetts, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15514
Summary:
Refine shadows in order to match decoration shadows. See D11069
The refined KStyle shadows(from Small to Very Large)
{F5754393, layout=center, size=full}
Desktop experience with the refined shadows
{F5754394, layout=center, size=full}
Depends on D11198
Reviewers: #breeze, #vdg, hpereiradacosta
Reviewed By: hpereiradacosta
Subscribers: abetts, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11175
Summary:
All these return statements are at the end of functions which return
nothing.
Reviewers: #breeze, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11638
Summary:
FEATURE: 388256
#VDG has decided that shadows should be horizontally centered and bigger. This patch implements those changes in the following way:
- Window and menu shadows are now horizontally centered
- Shadow size increased to the maximum value
- Shadow color changed from pure black to a slightly lighter Breeze standard color: Shade Black
Test Plan:
Tested in KDE Neon. Before:
{F5587393}
After:
{F5587390}
Reviewers: abetts, hpereiradacosta, #vdg, #breeze, alake
Reviewed By: abetts, hpereiradacosta, #vdg
Subscribers: rkflx, zzag, cfeck, januz, rpelorosso, apol, mvourlakos, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9549