diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-07-19 22:22:32 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-07-19 22:22:32 +0300 |
commit | 9873e7bba93f52616ad18b9867558c6fa6c40919 (patch) | |
tree | 1dfd00244fc479589ff9646b95e65100a472c785 /indra/llui/llview.cpp | |
parent | 0ca16a1f95a56066ad07f85985ba3310c57dbf3b (diff) | |
parent | be6066eae218856f7fd74b98968a75e5062fa830 (diff) |
Merge branch 'master' into DRTVWR-527-maint
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index cd47e2ecea..b942be2a4a 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; @@ -885,14 +887,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) std::string tooltip = getToolTip(); if (!tooltip.empty()) { + static LLCachedControl<F32> tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f); + static LLCachedControl<F32> tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f); + static LLCachedControl<bool> allow_ui_tooltips(*LLUI::getInstance()->mSettingGroups["config"], "BasicUITooltips", true); // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible F32 timeout = LLToolTipMgr::instance().toolTipVisible() - ? LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipFastDelay" ) - : LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipDelay" ); + ? tooltip_fast_delay + : tooltip_delay; // Even if we don't show tooltips, consume the event, nothing below should show tooltip - bool allow_ui_tooltips = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("BasicUITooltips"); if (allow_ui_tooltips) { LLToolTipMgr::instance().show(LLToolTip::Params() @@ -1189,7 +1193,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(); { @@ -1231,7 +1235,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. |