summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-06-28 20:08:29 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-06-28 20:08:29 -0400
commita12d5d7c6d8d816512ec9fc1355b37ce38a89cce (patch)
treef0613554333fe0b8761511be461ef6e438e06edd /indra/newview/llmeshrepository.cpp
parent8c5518f275029094ed42979a0f30d8314afadc3d (diff)
SH-4312 Clumsy configuration coordination between mesh and corehttp
Taught llappcorehttp to register signals on the settings values that chagne behavior. Have initialization and settings changes sweep through settings and change them. Dynamic changes are tried but have no effect (produce a warning message) as dynamic settings still aren't supported but the plumbing is now connected. Just need to change llcorehttp. Bounced the 'teleport started' signal around and it ended up back where it started with some cleanup. This is making me less angry...
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index aa10e64af8..3af9ce7342 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -259,10 +259,9 @@ const char * const LOG_MESH = "Mesh";
// Static data and functions to measure mesh load
// time metrics for a new region scene.
-static bool metrics_inited(false);
-static boost::signals2::connection metrics_teleport_connection;
static unsigned int metrics_teleport_start_count(0);
-static void metrics_teleport_started();
+boost::signals2::connection metrics_teleport_started_signal;
+static void teleport_started();
static bool is_retryable(LLCore::HttpStatus status);
//get the number of bytes resident in memory for given volume
@@ -2667,29 +2666,18 @@ void LLMeshRepository::init()
apr_sleep(100);
}
-
+ metrics_teleport_started_signal = LLViewerMessage::getInstance()->setTeleportStartedCallback(teleport_started);
mThread = new LLMeshRepoThread();
mThread->start();
- if (! metrics_inited)
- {
- // Get teleport started signals to restart timings.
- metrics_teleport_connection = LLViewerMessage::getInstance()->
- setTeleportStartedCallback(metrics_teleport_started);
- metrics_inited = true;
- }
}
void LLMeshRepository::shutdown()
{
llinfos << "Shutting down mesh repository." << llendl;
- if (metrics_inited)
- {
- metrics_teleport_connection.disconnect();
- metrics_inited = false;
- }
+ metrics_teleport_started_signal.disconnect();
for (U32 i = 0; i < mUploads.size(); ++i)
{
@@ -4109,6 +4097,7 @@ bool LLMeshRepository::meshRezEnabled()
// static
void LLMeshRepository::metricsStart()
{
+ ++metrics_teleport_start_count;
sQuiescentTimer.start(0);
}
@@ -4127,7 +4116,6 @@ void LLMeshRepository::metricsProgress(unsigned int this_count)
if (first_start)
{
- ++metrics_teleport_start_count;
metricsStart();
first_start = false;
}
@@ -4157,19 +4145,13 @@ void LLMeshRepository::metricsUpdate()
}
}
-// Will use a request to start a teleport as a signal to
-// restart a timing sequence. We don't get one of these
-// for login so initial start is done above.
-//
// Threading: main thread only
// static
-void metrics_teleport_started()
+void teleport_started()
{
LLMeshRepository::metricsStart();
- ++metrics_teleport_start_count;
}
-
// This comes from an edit in viewer-cat. Unify this once that's
// available everywhere.
bool is_retryable(LLCore::HttpStatus status)