diff options
author | Richard Linden <none@none> | 2013-01-04 13:48:35 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-01-04 13:48:35 -0800 |
commit | cbff0e7ab8afeebb6ddab854d35ea12ef9a9930a (patch) | |
tree | f99dcc890474f58a967a626ec07b477b1ab37e3d /indra/llui | |
parent | b2197101c488de66ca9ecf71c229f5b80d1390fd (diff) |
SH-3468 WIP add memory tracking base class
attempted fix for gcc compile errors
can't use typeid() on a class that doesn't have a method
defined in a translation unit
fix is to force classes deriving from LLMemTrackable to
use their own static member named sMemStat
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltextbase.h | 10 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 1 | ||||
-rw-r--r-- | indra/llui/llview.h | 1 | ||||
-rw-r--r-- | indra/llui/llviewmodel.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llviewmodel.h | 2 |
6 files changed, 14 insertions, 4 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 31d67a9e08..74e966560e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -47,6 +47,8 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; +LLTrace::MemStat 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), diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 966dd93888..7d791ec75a 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -94,10 +94,12 @@ public: /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const; /*virtual*/ BOOL hasMouseCapture(); - S32 getStart() const { return mStart; } - void setStart(S32 start) { mStart = start; } - S32 getEnd() const { return mEnd; } - void setEnd( S32 end ) { mEnd = end; } + S32 getStart() const { return mStart; } + void setStart(S32 start) { mStart = start; } + S32 getEnd() const { return mEnd; } + void setEnd( S32 end ) { mEnd = end; } + + static LLTrace::MemStat sMemStat; protected: S32 mStart; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 59577e95ac..47bf410af6 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -67,6 +67,7 @@ LLView* LLView::sPreviewClickedElement = NULL; BOOL LLView::sDrawPreviewHighlights = FALSE; S32 LLView::sLastLeftXML = S32_MIN; S32 LLView::sLastBottomXML = S32_MIN; +LLTrace::MemStat 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 29ee2125f9..256f86c00d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -673,6 +673,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; + static LLTrace::MemStat sMemStat; }; class LLCompareByTabOrder diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index dff0dcb2fd..1bd09e8086 100644 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,6 +35,8 @@ // external library headers // other Linden headers +LLTrace::MemStat LLViewModel::sMemStat("LLViewModel"); + /// LLViewModel::LLViewModel() : mDirty(false) diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index a2ca20c739..214780393b 100644 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -83,6 +83,8 @@ public: // void setDirty() { mDirty = true; } + static LLTrace::MemStat sMemStat; + protected: LLSD mValue; bool mDirty; |