SL-13729 Performance of LLUI and LLRender2D #2
parent
177ad21ade
commit
a5c8b1cbe2
|
|
@ -180,7 +180,9 @@ void LLConsole::draw()
|
|||
|
||||
LLUIImagePtr imagep = LLUI::getUIImage("transparent");
|
||||
|
||||
F32 console_opacity = llclamp(LLUI::getInstance()->mSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
|
||||
static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
|
||||
F32 console_opacity = llclamp((F32)console_bg_opacity, 0.f, 1.f);
|
||||
|
||||
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
|
|
|
|||
|
|
@ -378,13 +378,15 @@ void LLFloater::layoutDragHandle()
|
|||
// static
|
||||
void LLFloater::updateActiveFloaterTransparency()
|
||||
{
|
||||
sActiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("ActiveFloaterTransparency");
|
||||
static LLCachedControl<F32> active_transparency(*LLUI::getInstance()->mSettingGroups["config"], "ActiveFloaterTransparency", 1.f);
|
||||
sActiveControlTransparency = active_transparency;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloater::updateInactiveFloaterTransparency()
|
||||
{
|
||||
sInactiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("InactiveFloaterTransparency");
|
||||
static LLCachedControl<F32> inactive_transparency(*LLUI::getInstance()->mSettingGroups["config"], "InactiveFloaterTransparency", 0.95f);
|
||||
sInactiveControlTransparency = inactive_transparency;
|
||||
}
|
||||
|
||||
void LLFloater::addResizeCtrls()
|
||||
|
|
|
|||
|
|
@ -342,7 +342,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View");
|
|||
void LLFolderView::filter( LLFolderViewFilter& filter )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FILTER);
|
||||
filter.resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32(mParentPanel.get()->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100));
|
||||
static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
|
||||
filter.resetTime(llclamp((S32)(mParentPanel.get()->getVisible() ? time_visible : time_invisible), 1, 100));
|
||||
|
||||
// Note: we filter the model, not the view
|
||||
getViewModelItem()->filter(filter);
|
||||
|
|
@ -661,7 +663,8 @@ void LLFolderView::draw()
|
|||
closeAutoOpenedFolders();
|
||||
}
|
||||
|
||||
if (mSearchTimer.getElapsedTimeF32() > LLUI::getInstance()->mSettingGroups["config"]->getF32("TypeAheadTimeout") || !mSearchString.size())
|
||||
static LLCachedControl<F32> type_ahead_timeout(*LLUI::getInstance()->mSettingGroups["config"], "TypeAheadTimeout", 1.5f);
|
||||
if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || !mSearchString.size())
|
||||
{
|
||||
mSearchString.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ std::string LLFolderViewModelCommon::getStatusText()
|
|||
|
||||
void LLFolderViewModelCommon::filter()
|
||||
{
|
||||
getFilter().resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100));
|
||||
mFolderView->getViewModelItem()->filter(getFilter());
|
||||
static LLCachedControl<S32> max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
getFilter().resetTime(llclamp((S32)max_time, 1, 100));
|
||||
mFolderView->getViewModelItem()->filter(getFilter());
|
||||
}
|
||||
|
||||
bool LLFolderViewModelItemCommon::hasFilterStringMatch()
|
||||
|
|
|
|||
|
|
@ -1125,7 +1125,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
|
|||
BOOL handled = FALSE;
|
||||
|
||||
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
|
||||
S32 drag_threshold = LLUI::getInstance()->mSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
|
||||
static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3);
|
||||
if (mouse_distance_squared > drag_threshold * drag_threshold
|
||||
&& hasMouseCapture() &&
|
||||
mStartDragItemCallback && mHandleDragItemCallback)
|
||||
|
|
|
|||
|
|
@ -358,8 +358,8 @@ void LLToolTip::draw()
|
|||
|
||||
if (mFadeTimer.getStarted())
|
||||
{
|
||||
F32 tool_tip_fade_time = LLUI::getInstance()->mSettingGroups["config"]->getF32("ToolTipFadeTime");
|
||||
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time, 1.f, 0.f);
|
||||
static LLCachedControl<F32> tool_tip_fade_time(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFadeTime", 0.2f);
|
||||
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, (F32)tool_tip_fade_time, 1.f, 0.f);
|
||||
if (alpha == 0.f)
|
||||
{
|
||||
// finished fading out, so hide ourselves
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void LLUrlEntryBase::callObservers(const std::string &id,
|
|||
bool LLUrlEntryBase::isLinkDisabled() const
|
||||
{
|
||||
// this allows us to have a global setting to turn off text hyperlink highlighting/action
|
||||
bool globally_disabled = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions");
|
||||
static LLCachedControl<bool> globally_disabled(*LLUI::getInstance()->mSettingGroups["config"], "DisableTextHyperlinkActions", false);
|
||||
|
||||
return globally_disabled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -875,14 +875,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()
|
||||
|
|
|
|||
|
|
@ -1249,7 +1249,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|
|||
|
||||
BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
|
||||
{
|
||||
if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE;
|
||||
static LLCachedControl<bool> show_hover_tips(*LLUI::getInstance()->mSettingGroups["config"], "ShowHoverTips", true);
|
||||
if (!show_hover_tips) return TRUE;
|
||||
if (!mHoverPick.isValid()) return TRUE;
|
||||
|
||||
LLViewerObject* hover_object = mHoverPick.getObject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue