diff options
author | Richard Nelson <none@none> | 2010-07-30 15:17:32 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-07-30 15:17:32 -0700 |
commit | b95ad3b5cec84387d20d2a1af08eeb090b54b134 (patch) | |
tree | eb5edc9a7533e528a4a95fa7e00d6176b741a88c /indra/llui/llview.cpp | |
parent | 50005b81f7788cd7a372ab3009568bdb9e024a6e (diff) |
further UI rendering performance improvements
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 9e68277b0f..4d3708302b 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -403,28 +403,40 @@ bool LLCompareByTabOrder::operator() (const LLView* const a, const LLView* const return (a_score == b_score) ? a < b : a_score < b_score; } -bool LLView::trueToRoot(const boost::function<bool (const LLView*)>& predicate) const +BOOL LLView::isInVisibleChain() const { - const LLView* cur_view = this; - while(cur_view) + BOOL visible = TRUE; + + const LLView* viewp = this; + while(viewp) { - if(!predicate(cur_view)) + if (!viewp->getVisible()) { - return false; + visible = FALSE; + break; } - cur_view = cur_view->getParent(); + viewp = viewp->getParent(); } - return true; -} - -BOOL LLView::isInVisibleChain() const -{ - return trueToRoot(&LLView::getVisible); + + return visible; } BOOL LLView::isInEnabledChain() const { - return trueToRoot(&LLView::getEnabled); + BOOL enabled = TRUE; + + const LLView* viewp = this; + while(viewp) + { + if (!viewp->getEnabled()) + { + enabled = FALSE; + break; + } + viewp = viewp->getParent(); + } + + return enabled; } // virtual |