diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llconsole.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llfolderview.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltooltip.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llui.cpp | 14 | ||||
-rw-r--r-- | indra/llui/llui.h | 4 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 14 | ||||
-rw-r--r-- | indra/llui/llview.h | 3 |
9 files changed, 20 insertions, 25 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 1034a21905..16ca578111 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -977,7 +977,7 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child) LLRect screen_rect; localRectToScreen(child->getRect(),&screen_rect); - if ( root_rect.overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect)) + if ( root_rect.overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect)) { gGL.matrixMode(LLRender::MM_MODELVIEW); LLUI::pushMatrix(); diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index de09fdbafd..8fc2978bdd 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -181,7 +181,7 @@ void LLConsole::draw() LLUIImagePtr imagep = LLUI::getUIImage("transparent"); 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); + F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f); LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 483862298c..622c9edba7 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -344,7 +344,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) LL_RECORD_BLOCK_TIME(FTM_FILTER); 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)); + filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index a91c3e07d4..93122503d1 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -49,7 +49,7 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { static LLCachedControl<S32> max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); - getFilter().resetTime(llclamp((S32)max_time, 1, 100)); + getFilter().resetTime(llclamp(max_time(), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 1262e8a820..2f56a8b1d0 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -359,7 +359,7 @@ void LLToolTip::draw() if (mFadeTimer.getStarted()) { 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); + alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time(), 1.f, 0.f); if (alpha == 0.f) { // finished fading out, so hide ourselves diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 77b59e5bc5..6f16745bd3 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -154,7 +154,6 @@ mAudioCallback(audio_callback), mDeferredAudioCallback(deferred_audio_callback), mWindow(NULL), // set later in startup mRootView(NULL), -mDirty(FALSE), mHelpImpl(NULL) { LLRender2D::initParamSingleton(image_provider); @@ -203,19 +202,6 @@ void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& rem mClearPopupsFunc = clear_popups; } -void LLUI::dirtyRect(LLRect rect) -{ - if (!mDirty) - { - mDirtyRect = rect; - mDirty = TRUE; - } - else - { - mDirtyRect.unionWith(rect); - } -} - void LLUI::setMousePositionScreen(S32 x, S32 y) { #if defined(LL_DARWIN) diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 238bef3bf8..30dbd7248f 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -245,10 +245,6 @@ public: void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& ); - LLRect mDirtyRect; - BOOL mDirty; - void dirtyRect(LLRect rect); - // Return the ISO639 language name ("en", "ko", etc.) for the viewer UI. // http://www.loc.gov/standards/iso639-2/php/code_list.php std::string getUILanguage(); 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. diff --git a/indra/llui/llview.h b/indra/llui/llview.h index db81900aaf..7c90794ddb 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -656,6 +656,9 @@ public: // Draw debug rectangles around widgets to help with alignment and spacing static bool sDebugRects; + static bool sIsRectDirty; + static LLRect sDirtyRect; + // Draw widget names and sizes when drawing debug rectangles, turning this // off is useful to make the rectangles themselves easier to see. static bool sDebugRectsShowNames; |