summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b2b5c9d903..d052906bee 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -261,7 +261,7 @@ std::string LLViewerWindow::sMovieBaseName;
LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
-class RecordToChatConsole : public LLError::Recorder, public LLSingleton<RecordToChatConsole>
+class RecordToChatConsoleRecorder : public LLError::Recorder
{
public:
virtual void recordMessage(LLError::ELevel level,
@@ -285,6 +285,22 @@ public:
}
};
+class RecordToChatConsole : public LLSingleton<RecordToChatConsole>
+{
+public:
+ RecordToChatConsole()
+ : LLSingleton<RecordToChatConsole>(),
+ mRecorder(new RecordToChatConsoleRecorder())
+ {
+ }
+
+ void startRecorder() { LLError::addRecorder(mRecorder); }
+ void stopRecorder() { LLError::removeRecorder(mRecorder); }
+
+private:
+ LLError::RecorderPtr mRecorder;
+};
+
////////////////////////////////////////////////////////////////////////////
//
// LLDebugText
@@ -1886,11 +1902,11 @@ void LLViewerWindow::initBase()
// optionally forward warnings to chat console/chat floater
// for qa runs and dev builds
#if !LL_RELEASE_FOR_DOWNLOAD
- LLError::addRecorder(RecordToChatConsole::getInstance());
+ RecordToChatConsole::getInstance()->startRecorder();
#else
if(gSavedSettings.getBOOL("QAMode"))
{
- LLError::addRecorder(RecordToChatConsole::getInstance());
+ RecordToChatConsole::getInstance()->startRecorder();
}
#endif
@@ -1907,9 +1923,7 @@ void LLViewerWindow::initBase()
setProgressCancelButtonVisible(FALSE);
gMenuHolder = getRootView()->getChild<LLViewerMenuHolderGL>("Menu Holder");
-
LLMenuGL::sMenuContainer = gMenuHolder;
-
}
void LLViewerWindow::initWorldUI()
@@ -2039,8 +2053,7 @@ void LLViewerWindow::initWorldUI()
void LLViewerWindow::shutdownViews()
{
// clean up warning logger
- LLError::removeRecorder(RecordToChatConsole::getInstance());
-
+ RecordToChatConsole::getInstance()->stopRecorder();
LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ;
delete mDebugText;
@@ -2075,6 +2088,9 @@ void LLViewerWindow::shutdownViews()
// access to gMenuHolder
cleanup_menus();
LL_INFOS() << "menus destroyed." << LL_ENDL ;
+
+ view_listener_t::cleanup();
+ LL_INFOS() << "view listeners destroyed." << LL_ENDL ;
// Delete all child views.
delete mRootView;
@@ -2150,6 +2166,12 @@ LLViewerWindow::~LLViewerWindow()
delete mDebugText;
mDebugText = NULL;
+
+ if (LLViewerShaderMgr::sInitialized)
+ {
+ LLViewerShaderMgr::releaseInstance();
+ LLViewerShaderMgr::sInitialized = FALSE;
+ }
}