From 928b7cba3ec0eb675a254ff840f398b70e5a8a8c Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 25 Nov 2009 22:00:15 -0800 Subject: Linker optimization, use extern template for LLView::getChild<> --- indra/llui/llview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index dba24ee165..4fc52997a1 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -76,6 +76,9 @@ std::vector LLViewDrawContext::sDrawContextStack; BOOL LLView::sIsDrawing = FALSE; #endif +// Compiler optimization, generate extern template +template class LLView* LLView::getChild(const std::string& name, BOOL recurse) const; + static LLDefaultChildRegistry::Register r("view"); LLView::Params::Params() -- cgit v1.2.3 From b50ba67bd8ab329d598ce47e5d3ac09b59fffb63 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 29 Nov 2009 10:19:17 -0800 Subject: Revert extern template link optimization until I can build/test on PC --- indra/llui/llview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 4fc52997a1..ef23268a14 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -77,7 +77,7 @@ BOOL LLView::sIsDrawing = FALSE; #endif // Compiler optimization, generate extern template -template class LLView* LLView::getChild(const std::string& name, BOOL recurse) const; +//template class LLView* LLView::getChild(const std::string& name, BOOL recurse) const; static LLDefaultChildRegistry::Register r("view"); -- cgit v1.2.3 From 7d3b3cc474822db144b623980d08b7addc2f77ff Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 30 Nov 2009 14:41:52 -0800 Subject: Linker optimization - use "extern template" for commonly regenerated templates Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer. Reviewed with Ambroff --- indra/llui/llview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index ef23268a14..e7e8b1b858 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -33,6 +33,7 @@ #include "linden_common.h" +#define LLVIEW_CPP #include "llview.h" #include @@ -77,7 +78,8 @@ BOOL LLView::sIsDrawing = FALSE; #endif // Compiler optimization, generate extern template -//template class LLView* LLView::getChild(const std::string& name, BOOL recurse) const; +template class LLView* LLView::getChild( + const std::string& name, BOOL recurse) const; static LLDefaultChildRegistry::Register r("view"); -- cgit v1.2.3 From 6feb42e0095cfb46c11897d759bdd03033045f54 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 30 Nov 2009 15:45:15 -0800 Subject: De-inlined some UI param block definitions. --- indra/llui/llview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index e7e8b1b858..23e4131e6d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -83,6 +83,11 @@ template class LLView* LLView::getChild( static LLDefaultChildRegistry::Register r("view"); +LLView::Follows::Follows() +: string(""), + flags("flags", FOLLOWS_LEFT | FOLLOWS_TOP) +{} + LLView::Params::Params() : name("name", std::string("unnamed")), enabled("enabled", true), -- cgit v1.2.3 From 58d65d58a90ab61f4fa317c829e96f9d24bbc65b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 30 Dec 2009 15:34:30 -0800 Subject: EXT-2823 Find window: change default open location to the top-left of screen EXT-2921 [BSI] Default location for Screenshot Floater hides expanded options off screen reviewed by James --- indra/llui/llview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 23e4131e6d..6f8455774d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -2533,6 +2533,7 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) else { p.rect.left = p.rect.left + parent_rect.getWidth()/2 - p.rect.width/2; + p.rect.right.setProvided(false); // recalculate the right } } else @@ -2553,6 +2554,7 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) else { p.rect.bottom = p.rect.bottom + parent_rect.getHeight()/2 - p.rect.height/2; + p.rect.top.setProvided(false); // recalculate the top } } else -- cgit v1.2.3 From c6177836ecbe95f75d79f572303a879bf37b3226 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 7 Dec 2009 12:04:27 +0200 Subject: no ticket, minor refactoring. add return value to notifyXXX functions, may be usefull --HG-- branch : product-engine --- indra/llui/llview.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 23e4131e6d..d8ebe15dc0 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -2848,18 +2848,21 @@ LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const return *mDefaultWidgets; } -void LLView::notifyParent(const LLSD& info) +S32 LLView::notifyParent(const LLSD& info) { LLView* parent = getParent(); if(parent) - parent->notifyParent(info); + return parent->notifyParent(info); + return 0; } -void LLView::notifyChildren(const LLSD& info) +bool LLView::notifyChildren(const LLSD& info) { + bool ret = false; for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { - (*child_it)->notifyChildren(info); + ret |= (*child_it)->notifyChildren(info); } + return ret; } // convenient accessor for draw context -- cgit v1.2.3