summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-14 16:51:03 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-14 16:51:03 +0100
commit4b8083b12cdfc680c4465476090bbabe7607b729 (patch)
tree666d9c83e07db207947673189b2bf84a40cf45da
parentc3e0cbb86dd4c594c317fd2cb20e2909775513ae (diff)
UnityShell: initialize panel geometries vector outside the loop
(bzr r3592.1.3)
-rw-r--r--plugins/unityshell/src/unityshell.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index e6c3bd57b..aab320ac7 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -995,7 +995,7 @@ bool UnityScreen::DoesPointIntersectUnityGeos(nux::Point const& pt)
}
}
- for (nux::Geometry &panel_geo : panel_controller_->GetGeometries ())
+ for (nux::Geometry const& panel_geo : panel_controller_->GetGeometries ())
{
if (panel_geo.IsInside(pt))
{
@@ -1549,17 +1549,18 @@ void UnityScreen::compizDamageNux(CompRegion const& damage)
}
/* Grab changed nux regions and add damage rects for them */
-void UnityScreen::determineNuxDamage(CompRegion &nux_damage)
+void UnityScreen::determineNuxDamage(CompRegion& nux_damage)
{
/* Fetch all the dirty geometry from nux and aggregate it */
- std::vector<nux::Geometry> dirty = wt->GetPresentationListGeometries();
+ auto const& dirty = wt->GetPresentationListGeometries();
+ auto const& panels_geometries = panel_controller_->GetGeometries();
for (auto const& dirty_geo : dirty)
{
nux_damage += CompRegionFromNuxGeo(dirty_geo);
/* Special case, we need to redraw the panel shadow on panel updates */
- for (auto const& panel_geo : panel_controller_->GetGeometries())
+ for (auto const& panel_geo : panels_geometries)
{
if (!dirty_geo.IsIntersecting(panel_geo))
continue;