diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-04-30 11:37:16 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-04-30 11:37:16 -0700 |
commit | 8189c27cfad6f498966dc99dd483df8466330ccd (patch) | |
tree | 46ad47709db80448b0a9a48efa552f7690eda355 /indra/newview/llpersontabview.h | |
parent | 5d80f70a9cbcf5cb923c34ea4a2619e3d3df1aa9 (diff) |
ACME-252 Create AvatarFolderItemView: Optimization. Now the widths for the personview are computed once and stored staticically since they don't change per control.
Diffstat (limited to 'indra/newview/llpersontabview.h')
-rw-r--r-- | indra/newview/llpersontabview.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llpersontabview.h b/indra/newview/llpersontabview.h index 56d7f4eade..80020073d7 100644 --- a/indra/newview/llpersontabview.h +++ b/indra/newview/llpersontabview.h @@ -64,6 +64,9 @@ private: }; +typedef std::vector<S32> ChildWidthVec; +typedef std::vector<LLView *> ChildVec; + class LLPersonView : public LLFolderViewItem { @@ -127,11 +130,14 @@ private: ALIC_COUNT, } EAvatarListItemChildIndex; - typedef std::vector<std::pair<LLView *, S32>> ChildAndWidthVec; - ChildAndWidthVec mChildAndWidthVec; + //Widths of controls are same for every instance so can be static + static ChildWidthVec mChildWidthVec; + //Control pointers are different for each instance so non-static + ChildVec mChildVec; - static bool sStaticInitialized; - static void initChildrenWidths(LLPersonView* self); + static bool sChildrenWidthsInitialized; + static void initChildrenWidthVec(LLPersonView* self); + void initChildVec(); void updateChildren(); }; |