summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-06-17 10:40:42 -0700
committersimon <none@none>2014-06-17 10:40:42 -0700
commit592024b5805a116c9d0bef893127427df0741b41 (patch)
treebcadc0685873b40e23254cf3d6232e8f1f3f0e1b /indra/newview/llviewerwindow.cpp
parent9e855b03b7f285794520eaf781b6a963b6cd51d9 (diff)
parent977476171ddcc057d7c28b6c14ae988b8189ed75 (diff)
Merge viewer-release and become version 3.7.9
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp40
1 files changed, 31 insertions, 9 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4fae5c8e8e..4d263c118b 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()
@@ -2023,7 +2037,7 @@ void LLViewerWindow::initWorldUI()
destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
std::string url = gSavedSettings.getString("DestinationGuideURL");
url = LLWeb::expandURLSubstitutions(url, LLSD());
- destinations->navigateTo(url, "text/html");
+ destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
}
LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
if (avatar_picker)
@@ -2031,7 +2045,7 @@ void LLViewerWindow::initWorldUI()
avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
std::string url = gSavedSettings.getString("AvatarPickerURL");
url = LLWeb::expandURLSubstitutions(url, LLSD());
- avatar_picker->navigateTo(url, "text/html");
+ avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
}
}
@@ -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;
+ }
}