From 86d28366b1f53f56c444e5a5ccc025cd6b136b36 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 20 Feb 2019 20:30:43 +0200 Subject: SL-1811 Slight chat optimization --- indra/llui/lllayoutstack.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 69246a2f57..b1ba725c2f 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -251,8 +251,14 @@ void LLLayoutStack::draw() // always clip to stack itself LLLocalClipRect clip(getLocalRect()); - BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) + for (LLLayoutPanel* panelp : mPanels) { + if ((!panelp->getVisible() || panelp->mCollapsed) + && (panelp->mVisibleAmt < 0.001f || !mAnimate)) + { + // essentially invisible + continue; + } // clip to layout rectangle, not bounding rectangle LLRect clip_rect = panelp->getRect(); // scale clipping rectangle by visible amount -- cgit v1.2.3