summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/llfolderview.cpp2
-rw-r--r--indra/llui/llfolderviewitem.cpp16
-rwxr-xr-xindra/llui/lltextbase.cpp26
-rwxr-xr-xindra/llui/lltextbase.h2
-rwxr-xr-xindra/llui/lluictrl.cpp22
-rwxr-xr-xindra/llui/llview.cpp1
-rwxr-xr-xindra/llui/llview.h1
-rwxr-xr-xindra/llui/llviewmodel.cpp18
-rwxr-xr-xindra/llui/llviewmodel.h2
9 files changed, 40 insertions, 50 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index f0caba3e13..e6582a7ae9 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -174,7 +174,7 @@ LLFolderView::LLFolderView(const Params& p)
mShowItemLinkOverlays(p.show_item_link_overlays),
mViewModel(p.view_model)
{
- memClaim(mViewModel);
+ claimMem(mViewModel);
mViewModel->setFolderView(this);
mRoot = this;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 26ea9651b5..802cb783ed 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1496,16 +1496,16 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item )
ft = std::find(mFolders.begin(), mFolders.end(), f);
if (ft != mFolders.end())
{
- memDisclaim(mFolders);
+ disclaimMem(mFolders);
mFolders.erase(ft);
- memClaim(mFolders);
+ claimMem(mFolders);
}
}
else
{
- memDisclaim(mItems);
+ disclaimMem(mItems);
mItems.erase(it);
- memClaim(mItems);
+ claimMem(mItems);
}
//item has been removed, need to update filter
getViewModelItem()->removeChild(item->getViewModelItem());
@@ -1582,9 +1582,9 @@ void LLFolderViewFolder::addItem(LLFolderViewItem* item)
}
item->setParentFolder(this);
- memDisclaim(mItems);
+ disclaimMem(mItems);
mItems.push_back(item);
- memClaim(mItems);
+ claimMem(mItems);
item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
item->setVisible(FALSE);
@@ -1607,9 +1607,9 @@ void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
folder->mParentFolder->extractItem(folder);
}
folder->mParentFolder = this;
- memDisclaim(mFolders);
+ disclaimMem(mFolders);
mFolders.push_back(folder);
- memClaim(mFolders);
+ claimMem(mFolders);
folder->setOrigin(0, 0);
folder->reshape(getRect().getWidth(), 0);
folder->setVisible(FALSE);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 975f9df382..5c221edea7 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -48,8 +48,6 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds
const S32 CURSOR_THICKNESS = 2;
const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click.
-//LLTrace::MemStatHandle LLTextSegment::sMemStat("LLTextSegment");
-
LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num)
: mDocIndexStart(index_start),
mDocIndexEnd(index_end),
@@ -578,7 +576,7 @@ void LLTextBase::drawText()
if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) )
{
const LLWString& wstrText = getWText();
- memDisclaim(mMisspellRanges).clear();
+ disclaimMem(mMisspellRanges).clear();
segment_set_t::const_iterator seg_it = getSegIterContaining(start);
while (mSegments.end() != seg_it)
@@ -654,7 +652,7 @@ void LLTextBase::drawText()
mSpellCheckStart = start;
mSpellCheckEnd = end;
- memClaim(mMisspellRanges);
+ claimMem(mMisspellRanges);
}
}
else
@@ -924,11 +922,11 @@ void LLTextBase::createDefaultSegment()
if (mSegments.empty())
{
LLStyleConstSP sp(new LLStyle(getStyleParams()));
- memDisclaim(mSegments);
+ disclaimMem(mSegments);
LLTextSegmentPtr default_segment = new LLNormalTextSegment( sp, 0, getLength() + 1, *this);
mSegments.insert(default_segment);
default_segment->linkToDocument(this);
- memClaim(mSegments);
+ claimMem(mSegments);
}
}
@@ -939,7 +937,7 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert)
return;
}
- memDisclaim(mSegments);
+ disclaimMem(mSegments);
segment_set_t::iterator cur_seg_iter = getSegIterContaining(segment_to_insert->getStart());
S32 reflow_start_index = 0;
@@ -1013,7 +1011,7 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert)
// layout potentially changed
needsReflow(reflow_start_index);
- memClaim(mSegments);
+ claimMem(mSegments);
}
BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -1324,10 +1322,10 @@ void LLTextBase::replaceWithSuggestion(U32 index)
removeStringNoUndo(it->first, it->second - it->first);
// Insert the suggestion in its place
- memDisclaim(mSuggestionList);
+ disclaimMem(mSuggestionList);
LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index]));
- memClaim(mSuggestionList);
+ claimMem(mSuggestionList);
setCursorPos(it->first + (S32)suggestion.length());
@@ -1390,7 +1388,7 @@ bool LLTextBase::isMisspelledWord(U32 pos) const
void LLTextBase::onSpellCheckSettingsChange()
{
// Recheck the spelling on every change
- memDisclaim(mMisspellRanges).clear();
+ disclaimMem(mMisspellRanges).clear();
mSpellCheckStart = mSpellCheckEnd = -1;
}
@@ -1668,7 +1666,7 @@ LLRect LLTextBase::getTextBoundingRect()
void LLTextBase::clearSegments()
{
- memDisclaim(mSegments).clear();
+ disclaimMem(mSegments).clear();
createDefaultSegment();
}
@@ -3212,9 +3210,9 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip)
LL_WARNS() << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << LL_ENDL;
return;
}
- memDisclaim(mTooltip);
+ disclaimMem(mTooltip);
mTooltip = tooltip;
- memClaim(mTooltip);
+ claimMem(mTooltip);
}
bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 8925ec9e45..b1558a7abe 100755
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -100,8 +100,6 @@ public:
S32 getEnd() const { return mEnd; }
void setEnd( S32 end ) { mEnd = end; }
- //static LLTrace::MemStatHandle sMemStat;
-
protected:
S32 mStart;
S32 mEnd;
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 9a1a0e0677..9a81c91e0d 100755
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -118,7 +118,7 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
mDoubleClickSignal(NULL),
mTransparencyType(TT_DEFAULT)
{
- memClaim(viewmodel.get());
+ claimMem(viewmodel.get());
}
void LLUICtrl::initFromParams(const Params& p)
@@ -941,7 +941,7 @@ boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (L
}
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
{
- if (!mValidateSignal) mValidateSignal = memClaim(new enable_signal_t());
+ if (!mValidateSignal) mValidateSignal = claimMem(new enable_signal_t());
return mValidateSignal->connect(boost::bind(cb, _2));
}
@@ -1004,55 +1004,55 @@ boost::signals2::connection LLUICtrl::setValidateCallback(const EnableCallbackPa
boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::slot_type& cb )
{
- if (!mCommitSignal) mCommitSignal = memClaim(new commit_signal_t());
+ if (!mCommitSignal) mCommitSignal = claimMem(new commit_signal_t());
return mCommitSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t::slot_type& cb )
{
- if (!mValidateSignal) mValidateSignal = memClaim(new enable_signal_t());
+ if (!mValidateSignal) mValidateSignal = claimMem(new enable_signal_t());
return mValidateSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal_t::slot_type& cb )
{
- if (!mMouseEnterSignal) mMouseEnterSignal = memClaim(new commit_signal_t());
+ if (!mMouseEnterSignal) mMouseEnterSignal = claimMem(new commit_signal_t());
return mMouseEnterSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal_t::slot_type& cb )
{
- if (!mMouseLeaveSignal) mMouseLeaveSignal = memClaim(new commit_signal_t());
+ if (!mMouseLeaveSignal) mMouseLeaveSignal = claimMem(new commit_signal_t());
return mMouseLeaveSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mMouseDownSignal) mMouseDownSignal = memClaim(new mouse_signal_t());
+ if (!mMouseDownSignal) mMouseDownSignal = claimMem(new mouse_signal_t());
return mMouseDownSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mMouseUpSignal) mMouseUpSignal = memClaim(new mouse_signal_t());
+ if (!mMouseUpSignal) mMouseUpSignal = claimMem(new mouse_signal_t());
return mMouseUpSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mRightMouseDownSignal) mRightMouseDownSignal = memClaim(new mouse_signal_t());
+ if (!mRightMouseDownSignal) mRightMouseDownSignal = claimMem(new mouse_signal_t());
return mRightMouseDownSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mRightMouseUpSignal) mRightMouseUpSignal = memClaim(new mouse_signal_t());
+ if (!mRightMouseUpSignal) mRightMouseUpSignal = claimMem(new mouse_signal_t());
return mRightMouseUpSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setDoubleClickCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mDoubleClickSignal) mDoubleClickSignal = memClaim(new mouse_signal_t());
+ if (!mDoubleClickSignal) mDoubleClickSignal = claimMem(new mouse_signal_t());
return mDoubleClickSignal->connect(cb);
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 22461083a6..e81d19ae3a 100755
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -69,7 +69,6 @@ LLView* LLView::sPreviewClickedElement = NULL;
BOOL LLView::sDrawPreviewHighlights = FALSE;
S32 LLView::sLastLeftXML = S32_MIN;
S32 LLView::sLastBottomXML = S32_MIN;
-//LLTrace::MemStatHandle LLView::sMemStat("LLView");
std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack;
LLView::DrilldownFunc LLView::sDrilldown =
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index f6799d8cd9..3a0dfb5f42 100755
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -675,7 +675,6 @@ public:
static S32 sLastLeftXML;
static S32 sLastBottomXML;
static BOOL sForceReshape;
- //static LLTrace::MemStatHandle sMemStat;
};
namespace LLInitParam
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index 21c4e0fcac..6459ade027 100755
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -35,8 +35,6 @@
// external library headers
// other Linden headers
-//LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel");
-
///
LLViewModel::LLViewModel()
: mDirty(false)
@@ -83,11 +81,11 @@ void LLTextViewModel::setValue(const LLSD& value)
{
LLViewModel::setValue(value);
// approximate LLSD storage usage
- memDisclaim(mDisplay.size());
- memDisclaim(mDisplay);
+ disclaimMem(mDisplay.size());
+ disclaimMem(mDisplay);
mDisplay = utf8str_to_wstring(value.asString());
- memClaim(mDisplay);
- memClaim(mDisplay.size());
+ claimMem(mDisplay);
+ claimMem(mDisplay.size());
// mDisplay and mValue agree
mUpdateFromDisplay = false;
@@ -99,11 +97,11 @@ void LLTextViewModel::setDisplay(const LLWString& value)
// and do the utf8str_to_wstring() to get the corresponding mDisplay
// value. But a text editor might want to edit the display string
// directly, then convert back to UTF8 on commit.
- memDisclaim(mDisplay.size());
- memDisclaim(mDisplay);
+ disclaimMem(mDisplay.size());
+ disclaimMem(mDisplay);
mDisplay = value;
- memClaim(mDisplay);
- memClaim(mDisplay.size());
+ claimMem(mDisplay);
+ claimMem(mDisplay.size());
mDirty = true;
// Don't immediately convert to UTF8 -- do it lazily -- we expect many
// more setDisplay() calls than getValue() calls. Just flag that it needs
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
index f329201b9f..49d7c322a3 100755
--- a/indra/llui/llviewmodel.h
+++ b/indra/llui/llviewmodel.h
@@ -83,8 +83,6 @@ public:
//
void setDirty() { mDirty = true; }
- //static LLTrace::MemStatHandle sMemStat;
-
protected:
LLSD mValue;
bool mDirty;