diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/lltrace.h | 9 | ||||
-rw-r--r-- | indra/llcommon/lltracerecording.cpp | 64 | ||||
-rw-r--r-- | indra/llcommon/lltracerecording.h | 56 | ||||
-rwxr-xr-x | indra/llui/llfolderview.cpp | 3 | ||||
-rwxr-xr-x | indra/llui/llfolderview.h | 32 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 8 | ||||
-rwxr-xr-x | indra/llui/llfolderviewmodel.h | 24 | ||||
-rwxr-xr-x | indra/llui/llstatview.h | 3 | ||||
-rwxr-xr-x | indra/llui/llviewmodel.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 6 |
10 files changed, 116 insertions, 94 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 9c620ca5e3..5c833ea287 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -268,7 +268,7 @@ public: setKey(name); } - /*virtual*/ const char* getUnitLabel() const { return "B"; } + /*virtual*/ const char* getUnitLabel() const { return "KB"; } TraceType<MemStatAccumulator::AllocationFacet>& allocations() { @@ -409,10 +409,12 @@ class MemTrackable typedef MemTrackable<DERIVED, ALIGNMENT> mem_trackable_t; static MemStatHandle sMemStat; + public: typedef void mem_trackable_tag_t; MemTrackable() + : mMemFootprint(0) { static bool name_initialized = false; if (!name_initialized) @@ -427,6 +429,11 @@ public: memDisclaim(mMemFootprint); } + static MemStatHandle& getMemStatHandle() + { + return sMemStat; + } + void* operator new(size_t size) { claim_mem(sMemStat, size); diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 5728997676..c606007d89 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -178,62 +178,62 @@ bool Recording::hasValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& st return mBuffers->mMemStats[stat.getIndex()].mShadowSize.hasValue(); } -F64Bytes Recording::getMin(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMin(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); } -F64Bytes Recording::getMean(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMean(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); } -F64Bytes Recording::getMax(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMax(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); } -F64Bytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); } -F64Bytes Recording::getLastValue(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getLastValue(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } -F64Bytes Recording::getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMin()); } -F64Bytes Recording::getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMean()); } -F64Bytes Recording::getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMax()); } -F64Bytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getStandardDeviation()); } -F64Bytes Recording::getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getLastValue()); } -F64Bytes Recording::getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat) +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocated.getSum()); } -F64Bytes Recording::getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat) +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocated.getSum() / mElapsedSeconds.value()); } @@ -243,12 +243,12 @@ U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::AllocationFace return mBuffers->mMemStats[stat.getIndex()].mAllocated.getSampleCount(); } -F64Bytes Recording::getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSum()); } -F64Bytes Recording::getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSum() / mElapsedSeconds.value()); } @@ -258,12 +258,12 @@ U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::DeallocationFa return mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSampleCount(); } -F64Bytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSum()); } -F64Bytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSum() / mElapsedSeconds.value()); } @@ -273,12 +273,12 @@ U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::ShadowAllocati return mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSampleCount(); } -F64Bytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowDeallocated.getSum()); } -F64Bytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowDeallocated.getSum() / mElapsedSeconds.value()); } @@ -767,12 +767,12 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const TraceType<SampleAccumul } -F64Bytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes min_val(std::numeric_limits<F64>::max()); + F64Kilobytes min_val(std::numeric_limits<F64>::max()); for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); @@ -782,17 +782,17 @@ F64Bytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& s return min_val; } -F64Bytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, size_t num_periods) { return getPeriodMin(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/) +F64Kilobytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes max_val(0.0); + F64Kilobytes max_val(0.0); for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); @@ -802,17 +802,17 @@ F64Bytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& st return max_val; } -F64Bytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, size_t num_periods) { return getPeriodMax(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes mean(0); + F64Kilobytes mean(0); for (S32 i = 1; i <= num_periods; i++) { @@ -823,17 +823,17 @@ F64Bytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& return mean / F64(num_periods); } -F64Bytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, size_t num_periods) { return getPeriodMean(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes period_mean = getPeriodMean(stat, num_periods); + F64Kilobytes period_mean = getPeriodMean(stat, num_periods); S32 valid_period_count = 0; F64 sum_of_squares = 0; @@ -842,18 +842,18 @@ F64Bytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatA Recording& recording = getPrevRecording(i); if (recording.hasValue(stat)) { - F64Bytes delta = recording.getMean(stat) - period_mean; + F64Kilobytes delta = recording.getMean(stat) - period_mean; sum_of_squares += delta.value() * delta.value(); valid_period_count++; } } - return F64Bytes(valid_period_count + return F64Kilobytes(valid_period_count ? sqrt(sum_of_squares / (F64)valid_period_count) : NaN); } -F64Bytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods) { return getPeriodStandardDeviation(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 466efe44ce..3f7737b20b 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -180,32 +180,32 @@ namespace LLTrace bool hasValue(const TraceType<MemStatAccumulator>& stat); bool hasValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMin(const TraceType<MemStatAccumulator>& stat); - F64Bytes getMean(const TraceType<MemStatAccumulator>& stat); - F64Bytes getMax(const TraceType<MemStatAccumulator>& stat); - F64Bytes getStandardDeviation(const TraceType<MemStatAccumulator>& stat); - F64Bytes getLastValue(const TraceType<MemStatAccumulator>& stat); - - F64Bytes getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - - F64Bytes getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat); - F64Bytes getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat); + F64Kilobytes getMin(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getMean(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getMax(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getStandardDeviation(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getLastValue(const TraceType<MemStatAccumulator>& stat); + + F64Kilobytes getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + + F64Kilobytes getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat); U32 getSampleCount(const TraceType<MemStatAccumulator::AllocationFacet>& stat); - F64Bytes getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); - F64Bytes getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); + F64Kilobytes getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); U32 getSampleCount(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); - F64Bytes getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); - F64Bytes getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); + F64Kilobytes getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); U32 getSampleCount(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); - F64Bytes getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); - F64Bytes getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); + F64Kilobytes getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); U32 getSampleCount(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); // CountStatHandle accessors @@ -410,8 +410,8 @@ namespace LLTrace return T(getPeriodMin(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMin(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMin(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMin(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMin(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -474,8 +474,8 @@ namespace LLTrace return T(getPeriodMax(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMax(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMax(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -543,8 +543,8 @@ namespace LLTrace return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMean(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMean(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMean(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMean(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -593,8 +593,8 @@ namespace LLTrace return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodStandardDeviation(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodStandardDeviation(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods = U32_MAX); private: // implementation for LLStopWatchControlsMixin diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 373b0e05ac..f0caba3e13 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -174,6 +174,7 @@ LLFolderView::LLFolderView(const Params& p) mShowItemLinkOverlays(p.show_item_link_overlays), mViewModel(p.view_model) { + memClaim(mViewModel); mViewModel->setFolderView(this); mRoot = this; @@ -1578,7 +1579,7 @@ BOOL LLFolderView::getShowSelectionContext() return FALSE; } -void LLFolderView::setShowSingleSelection(BOOL show) +void LLFolderView::setShowSingleSelection(bool show) { if (show != mShowSingleSelection) { diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 652e22c7bc..4ef685ba0c 100755 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -208,9 +208,9 @@ public: LLRect getVisibleRect(); BOOL search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward); - void setShowSelectionContext(BOOL show) { mShowSelectionContext = show; } + void setShowSelectionContext(bool show) { mShowSelectionContext = show; } BOOL getShowSelectionContext(); - void setShowSingleSelection(BOOL show); + void setShowSingleSelection(bool show); BOOL getShowSingleSelection() { return mShowSingleSelection; } F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); } bool getUseEllipses() { return mUseEllipses; } @@ -260,31 +260,32 @@ protected: LLHandle<LLView> mPopupMenuHandle; selected_items_t mSelectedItems; - BOOL mKeyboardSelection; - BOOL mAllowMultiSelect; - BOOL mShowEmptyMessage; - BOOL mShowFolderHierarchy; + bool mKeyboardSelection, + mAllowMultiSelect, + mShowEmptyMessage, + mShowFolderHierarchy, + mNeedsScroll, + mPinningSelectedItem, + mNeedsAutoSelect, + mAutoSelectOverride, + mNeedsAutoRename, + mUseLabelSuffix, + mDragAndDropThisFrame, + mShowItemLinkOverlays, + mShowSelectionContext, + mShowSingleSelection; // Renaming variables and methods LLFolderViewItem* mRenameItem; // The item currently being renamed LLLineEditor* mRenamer; - BOOL mNeedsScroll; - BOOL mPinningSelectedItem; LLRect mScrollConstraintRect; - BOOL mNeedsAutoSelect; - BOOL mAutoSelectOverride; - BOOL mNeedsAutoRename; - bool mUseLabelSuffix; - bool mShowItemLinkOverlays; LLDepthStack<LLFolderViewFolder> mAutoOpenItems; LLFolderViewFolder* mAutoOpenCandidate; LLFrameTimer mAutoOpenTimer; LLFrameTimer mSearchTimer; std::string mSearchString; - BOOL mShowSelectionContext; - BOOL mShowSingleSelection; LLFrameTimer mMultiSelectionFadeTimer; S32 mArrangeGeneration; @@ -292,7 +293,6 @@ protected: signal_t mReshapeSignal; S32 mSignalSelectCallback; S32 mMinWidth; - BOOL mDragAndDropThisFrame; LLPanel* mParentPanel; diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index ac36cd1173..26ea9651b5 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1496,12 +1496,16 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) ft = std::find(mFolders.begin(), mFolders.end(), f); if (ft != mFolders.end()) { + memDisclaim(mFolders); mFolders.erase(ft); + memClaim(mFolders); } } else { + memDisclaim(mItems); mItems.erase(it); + memClaim(mItems); } //item has been removed, need to update filter getViewModelItem()->removeChild(item->getViewModelItem()); @@ -1578,7 +1582,9 @@ void LLFolderViewFolder::addItem(LLFolderViewItem* item) } item->setParentFolder(this); + memDisclaim(mItems); mItems.push_back(item); + memClaim(mItems); item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); item->setVisible(FALSE); @@ -1601,7 +1607,9 @@ void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) folder->mParentFolder->extractItem(folder); } folder->mParentFolder = this; + memDisclaim(mFolders); mFolders.push_back(folder); + memClaim(mFolders); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index b1bcc8bbb4..3f62d133e4 100755 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -108,7 +108,7 @@ public: virtual S32 getFirstRequiredGeneration() const = 0; }; -class LLFolderViewModelInterface +class LLFolderViewModelInterface : public LLTrace::MemTrackable<LLFolderViewModelInterface> { public: virtual ~LLFolderViewModelInterface() {} @@ -128,7 +128,7 @@ public: // This is an abstract base class that users of the folderview classes // would use to bridge the folder view with the underlying data -class LLFolderViewModelItem : public LLRefCount +class LLFolderViewModelItem : public LLRefCount, public LLTrace::MemTrackable<LLFolderViewModelItem> { public: LLFolderViewModelItem() { } @@ -336,18 +336,18 @@ protected: virtual void setParent(LLFolderViewModelItem* parent) { mParent = parent; } virtual bool hasParent() { return mParent != NULL; } - S32 mSortVersion; - bool mPassedFilter; - bool mPassedFolderFilter; - std::string::size_type mStringMatchOffsetFilter; - std::string::size_type mStringFilterSize; + S32 mSortVersion; + bool mPassedFilter; + bool mPassedFolderFilter; + std::string::size_type mStringMatchOffsetFilter; + std::string::size_type mStringFilterSize; - S32 mLastFilterGeneration; - S32 mLastFolderFilterGeneration; - S32 mMostFilteredDescendantGeneration; + S32 mLastFilterGeneration, + mLastFolderFilterGeneration, + mMostFilteredDescendantGeneration; - child_list_t mChildren; - LLFolderViewModelItem* mParent; + child_list_t mChildren; + LLFolderViewModelItem* mParent; LLFolderViewModelInterface& mRootViewModel; void setFolderViewItem(LLFolderViewItem* folder_view_item) { mFolderViewItem = folder_view_item;} diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h index 5abdc42448..bc78d3b5fd 100755 --- a/indra/llui/llstatview.h +++ b/indra/llui/llstatview.h @@ -46,7 +46,8 @@ public: Params() : setting("setting") { - changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); + changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); + changeDefault(show_label, true); } }; diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index 1b0ab6d92c..21c4e0fcac 100755 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -82,9 +82,12 @@ LLTextViewModel::LLTextViewModel(const LLSD& value) void LLTextViewModel::setValue(const LLSD& value) { LLViewModel::setValue(value); + // approximate LLSD storage usage + memDisclaim(mDisplay.size()); memDisclaim(mDisplay); mDisplay = utf8str_to_wstring(value.asString()); memClaim(mDisplay); + memClaim(mDisplay.size()); // mDisplay and mValue agree mUpdateFromDisplay = false; @@ -96,9 +99,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); mDisplay = value; memClaim(mDisplay); + memClaim(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/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3276985114..6358620f0b 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -653,16 +653,16 @@ void LLInventoryPanel::idle(void* user_data) EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept(); if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE) { - panel->mFolderRoot->setShowSingleSelection(TRUE); + panel->mFolderRoot->setShowSingleSelection(true); } else { - panel->mFolderRoot->setShowSingleSelection(FALSE); + panel->mFolderRoot->setShowSingleSelection(false); } } else { - panel->mFolderRoot->setShowSingleSelection(FALSE); + panel->mFolderRoot->setShowSingleSelection(false); } } |