summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrlfactory.h
diff options
context:
space:
mode:
authorsimon <none@none>2014-05-07 13:19:05 -0700
committersimon <none@none>2014-05-07 13:19:05 -0700
commitdc4c184696b308b8f60fa1dd751b35e22bd47d62 (patch)
tree1606d992f1cce6fe19572042c456725eb95d7066 /indra/llui/lluictrlfactory.h
parent883467a3cc421fca68a25589114e0e3f0538ff0e (diff)
parent250db74bf9325acdc1169f6c13d297e7fe44b753 (diff)
Merge downstream version 3.7.8 code
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rwxr-xr-xindra/llui/lluictrlfactory.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 876bb5ef46..a5796c8af2 100755
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -74,9 +74,9 @@ class LLWidgetNameRegistry
//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry>
//{};
-extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;
-extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION;
-extern LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS;
+extern LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP;
+extern LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION;
+extern LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS;
// Build time optimization, generate this once in .cpp file
#ifndef LLUICTRLFACTORY_CPP
@@ -170,8 +170,8 @@ public:
LLXMLNodePtr root_node;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
- {
- llwarns << "Couldn't parse XUI file: " << instance().getCurFileName() << llendl;
+ {
+ LL_WARNS() << "Couldn't parse XUI file: " << instance().getCurFileName() << LL_ENDL;
goto fail;
}
@@ -182,7 +182,7 @@ public:
// not of right type, so delete it
if (!widget)
{
- llwarns << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << llendl;
+ LL_WARNS() << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << LL_ENDL;
delete view;
view = NULL;
}
@@ -225,14 +225,14 @@ private:
if (!params.validateBlock())
{
- llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+ LL_WARNS() << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << LL_ENDL;
//return NULL;
}
- { LLFastTimer _(FTM_WIDGET_CONSTRUCTION);
+ { LL_RECORD_BLOCK_TIME(FTM_WIDGET_CONSTRUCTION);
widget = new T(params);
}
- { LLFastTimer _(FTM_INIT_FROM_PARAMS);
+ { LL_RECORD_BLOCK_TIME(FTM_INIT_FROM_PARAMS);
widget->initFromParams(params);
}
@@ -247,7 +247,7 @@ private:
template<typename T>
static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
{
- LLFastTimer timer(FTM_WIDGET_SETUP);
+ LL_RECORD_BLOCK_TIME(FTM_WIDGET_SETUP);
typename T::Params params(getDefaultParams<T>());
@@ -259,10 +259,8 @@ private:
// We always want to output top-left coordinates
typename T::Params output_params(params);
T::setupParamsForExport(output_params, parent);
- // Export only the differences between this any default params
- typename T::Params default_params(getDefaultParams<T>());
copyName(node, output_node);
- parser.writeXUI(output_node, output_params, &default_params);
+ parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &getDefaultParams<T>());
}
// Apply layout transformations, usually munging rect