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/lluictrl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/lluictrl.cpp') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index a30d5b4651..466f45942d 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -40,6 +40,10 @@ static LLDefaultChildRegistry::Register r("ui_ctrl"); +// Compiler optimization, generate extern template +template class LLUICtrl* LLView::getChild( + const std::string& name, BOOL recurse) const; + LLUICtrl::Params::Params() : tab_stop("tab_stop", true), chrome("chrome", false), -- 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/lluictrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/lluictrl.cpp') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 466f45942d..3cf592f351 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -41,8 +41,8 @@ static LLDefaultChildRegistry::Register r("ui_ctrl"); // Compiler optimization, generate extern template -template class LLUICtrl* LLView::getChild( - const std::string& name, BOOL recurse) const; +//template class LLUICtrl* LLView::getChild( +// const std::string& name, BOOL recurse) const; LLUICtrl::Params::Params() : tab_stop("tab_stop", true), -- 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/lluictrl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llui/lluictrl.cpp') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 3cf592f351..1e0af1201f 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -31,9 +31,11 @@ * $/LicenseInfo$ */ -//#include "llviewerprecompiledheaders.h" #include "linden_common.h" + +#define LLUICTRL_CPP #include "lluictrl.h" + #include "llfocusmgr.h" #include "llpanel.h" #include "lluictrlfactory.h" @@ -41,8 +43,8 @@ static LLDefaultChildRegistry::Register r("ui_ctrl"); // Compiler optimization, generate extern template -//template class LLUICtrl* LLView::getChild( -// const std::string& name, BOOL recurse) const; +template class LLUICtrl* LLView::getChild( + const std::string& name, BOOL recurse) const; LLUICtrl::Params::Params() : tab_stop("tab_stop", true), -- 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/lluictrl.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'indra/llui/lluictrl.cpp') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 1e0af1201f..706712ec5e 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -46,6 +46,28 @@ static LLDefaultChildRegistry::Register r("ui_ctrl"); template class LLUICtrl* LLView::getChild( const std::string& name, BOOL recurse) const; +LLUICtrl::CallbackParam::CallbackParam() +: name("name"), + function_name("function"), + parameter("parameter"), + control_name("control") // Shortcut to control -> "control_name" for backwards compatability +{ + addSynonym(parameter, "userdata"); +} + +LLUICtrl::EnableControls::EnableControls() +: enabled("enabled_control"), + disabled("disabled_control") +{} + +LLUICtrl::ControlVisibility::ControlVisibility() +: visible("visibility_control"), + invisible("invisibility_control") +{ + addSynonym(visible, "visiblity_control"); + addSynonym(invisible, "invisiblity_control"); +} + LLUICtrl::Params::Params() : tab_stop("tab_stop", true), chrome("chrome", false), -- cgit v1.2.3