summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-18 16:57:57 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-18 17:27:12 +0300
commit0d7f6d917af2e0b19a32a925ded6fab4b1a6725e (patch)
treebf99cbd68261b3b4c61b1f3d042044eb76db6fa2 /indra/llui/llview.cpp
parenta5c8b1cbe20c2ccd609f550ff4983741f622fc27 (diff)
SL-13729 Performance of LLUI and LLRender2D #3
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 8b889376b8..f8686018b8 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -60,6 +60,8 @@ static const S32 LINE_HEIGHT = 15;
S32 LLView::sDepth = 0;
bool LLView::sDebugRects = false;
+bool LLView::sIsRectDirty = false;
+LLRect LLView::sDirtyRect;
bool LLView::sDebugRectsShowNames = true;
bool LLView::sDebugKeys = false;
bool LLView::sDebugMouseHandling = false;
@@ -1181,7 +1183,7 @@ void LLView::drawChildren()
if (viewp->getVisible() && viewp->getRect().isValid())
{
LLRect screen_rect = viewp->calcScreenRect();
- if ( rootp->getLocalRect().overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect))
+ if ( rootp->getLocalRect().overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect))
{
LLUI::pushMatrix();
{
@@ -1223,7 +1225,15 @@ void LLView::dirtyRect()
parent = parent->getParent();
}
- LLUI::getInstance()->dirtyRect(cur->calcScreenRect());
+ if (!sIsRectDirty)
+ {
+ sDirtyRect = cur->calcScreenRect();
+ sIsRectDirty = true;
+ }
+ else
+ {
+ sDirtyRect.unionWith(cur->calcScreenRect());
+ }
}
//Draw a box for debugging.