summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-18 21:08:25 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-18 21:08:25 +0100
commit433682ac2dd8c34a032578713b187afb3f8ca23a (patch)
tree65cf50525b48c75451bd89f6605d769874ffe027 /plugins/unityshell
parent433f4c53d22b049fbd7df26f2acf247b56c05dba (diff)
BackgroundEffectHelper: keep a cached version of blur geometries
Now the blurred geometries are saved in a list that gets updated only when they change, this allows to reduce a lot the cost of GetBlurGeometries that now only returns a const reference of the actual vector. Improved also HasEnabledHelpers (no helper can be registered if it's not enabled). (bzr r3347.5.20)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 9ec2ae919..a1a4ff3c5 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -777,9 +777,8 @@ void UnityScreen::paintDisplay()
/* We are using a CompRegion here so that we can combine rectangles
* where it might make sense to. Saves calls into OpenGL */
CompRegion blur_region;
- auto const& blur_geometries = BackgroundEffectHelper::GetBlurGeometries();
- for (auto const& blur_geometry : blur_geometries)
+ for (auto const& blur_geometry : BackgroundEffectHelper::GetBlurGeometries())
{
auto blur_rect = CompRectFromNuxGeo(blur_geometry);
blur_region += (blur_rect & *output);