From 4b8083b12cdfc680c4465476090bbabe7607b729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 14 Nov 2013 16:51:03 +0100 Subject: UnityShell: initialize panel geometries vector outside the loop (bzr r3592.1.3) --- plugins/unityshell/src/unityshell.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins') 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 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; -- cgit v1.2.3