summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--[-rwxr-xr-x]indra/newview/CMakeLists.txt2
-rw-r--r--[-rwxr-xr-x]indra/newview/app_settings/logcontrol.xml2
-rw-r--r--[-rwxr-xr-x]indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl1
-rw-r--r--indra/newview/gpu_table.txt86
-rw-r--r--[-rwxr-xr-x]indra/newview/llagentwearables.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llagentwearables.h0
-rw-r--r--[-rwxr-xr-x]indra/newview/llappearancemgr.cpp0
-rw-r--r--indra/newview/llappviewer.cpp27
-rw-r--r--indra/newview/llappviewer.h3
-rw-r--r--indra/newview/llappviewerlinux.cpp3
-rw-r--r--indra/newview/llappviewermacosx.cpp4
-rw-r--r--indra/newview/llappviewerwin32.cpp3
-rw-r--r--indra/newview/lldebugview.cpp9
-rw-r--r--indra/newview/lldrawable.cpp20
-rw-r--r--indra/newview/lldrawable.h2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp3
-rw-r--r--indra/newview/lldrawpoolbump.cpp2
-rw-r--r--indra/newview/lldriverparam.h15
-rw-r--r--indra/newview/llface.cpp8
-rw-r--r--indra/newview/llfasttimerview.cpp42
-rw-r--r--indra/newview/llfasttimerview.h2
-rw-r--r--indra/newview/llflexibleobject.cpp4
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp2
-rw-r--r--indra/newview/llfloatercamera.cpp4
-rw-r--r--indra/newview/llfloatercolorpicker.cpp2
-rw-r--r--indra/newview/llfloaterjoystick.cpp4
-rw-r--r--indra/newview/llfloaterland.cpp3
-rw-r--r--indra/newview/llfloatermap.cpp18
-rw-r--r--indra/newview/llfloatermap.h1
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llinventoryfunctions.cpp1
-rw-r--r--[-rwxr-xr-x]indra/newview/llinventorymodel.cpp0
-rw-r--r--indra/newview/llinventorypanel.cpp6
-rw-r--r--indra/newview/llmemoryview.cpp333
-rw-r--r--indra/newview/llmemoryview.h62
-rw-r--r--indra/newview/llnearbychatbar.cpp20
-rw-r--r--indra/newview/lloutfitslist.cpp30
-rw-r--r--indra/newview/lloutfitslist.h10
-rw-r--r--indra/newview/llpanellandmarks.cpp13
-rw-r--r--indra/newview/llpanellandmarks.h1
-rw-r--r--indra/newview/llpanelmaininventory.cpp5
-rw-r--r--indra/newview/llpanelplaces.cpp2
-rw-r--r--indra/newview/llpanelteleporthistory.cpp5
-rw-r--r--indra/newview/llpaneltopinfobar.cpp8
-rw-r--r--indra/newview/llpolymesh.cpp2
-rw-r--r--indra/newview/llpolymesh.h17
-rw-r--r--indra/newview/llpolymorph.cpp26
-rw-r--r--indra/newview/llpolymorph.h15
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/llspatialpartition.cpp36
-rw-r--r--[-rwxr-xr-x]indra/newview/llstartup.cpp8
-rw-r--r--[-rwxr-xr-x]indra/newview/llstartup.h0
-rw-r--r--indra/newview/llsurface.cpp3
-rw-r--r--indra/newview/llsurface.h3
-rw-r--r--indra/newview/lltexlayerparams.h32
-rwxr-xr-x[-rw-r--r--]indra/newview/lltexturefetch.cpp13
-rw-r--r--indra/newview/lltexturefetch.h1
-rw-r--r--[-rwxr-xr-x]indra/newview/lltextureview.cpp0
-rw-r--r--indra/newview/lltoastalertpanel.cpp1
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerassetstats.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerassetstats.h0
-rw-r--r--indra/newview/llviewerdisplay.cpp17
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerinventory.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerjointmesh.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerjointmesh.h0
-rw-r--r--indra/newview/llviewerkeyboard.cpp5
-rw-r--r--indra/newview/llviewermenu.cpp36
-rw-r--r--indra/newview/llviewermenufile.cpp10
-rwxr-xr-xindra/newview/llviewermessage.cpp40
-rw-r--r--indra/newview/llviewerobject.cpp34
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp86
-rw-r--r--indra/newview/llviewerparceloverlay.cpp1
-rw-r--r--indra/newview/llviewerpartsim.cpp26
-rw-r--r--indra/newview/llviewerpartsim.h2
-rw-r--r--indra/newview/llviewerpartsource.cpp22
-rw-r--r--indra/newview/llviewerprecompiledheaders.h7
-rw-r--r--indra/newview/llviewerregion.cpp12
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerstats.cpp270
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerstats.h169
-rw-r--r--indra/newview/llviewerstatsrecorder.cpp181
-rw-r--r--indra/newview/llviewerstatsrecorder.h84
-rw-r--r--indra/newview/llviewertexteditor.cpp8
-rw-r--r--indra/newview/llviewertexture.cpp1
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewertexture.h0
-rw-r--r--indra/newview/llviewertexturelist.cpp21
-rw-r--r--indra/newview/llviewervisualparam.h3
-rwxr-xr-xindra/newview/llviewerwindow.cpp84
-rw-r--r--indra/newview/llviewerwindow.h7
-rw-r--r--indra/newview/llvlcomposition.cpp2
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatar.cpp28
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatar.h0
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatarself.cpp6
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatarself.h0
-rw-r--r--indra/newview/llvograss.cpp1
-rw-r--r--indra/newview/llvopartgroup.cpp1
-rw-r--r--indra/newview/llvovolume.cpp19
-rw-r--r--indra/newview/llvowlsky.cpp2
-rw-r--r--indra/newview/llworld.cpp4
-rw-r--r--indra/newview/llworldmapview.cpp2
-rw-r--r--indra/newview/pipeline.cpp85
-rw-r--r--indra/newview/pipeline.h8
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_ui_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml27
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_script_ed.xml1
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
-rw-r--r--[-rwxr-xr-x]indra/newview/tests/llviewerassetstats_test.cpp0
115 files changed, 858 insertions, 1448 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0031362210..0172d2107d 100755..100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -333,7 +333,6 @@ set(viewer_SOURCE_FILES
llmarketplacenotifications.cpp
llmediactrl.cpp
llmediadataclient.cpp
- llmemoryview.cpp
llmeshrepository.cpp
llmimetypes.cpp
llmorphview.cpp
@@ -909,7 +908,6 @@ set(viewer_HEADER_FILES
llmarketplacenotifications.h
llmediactrl.h
llmediadataclient.h
- llmemoryview.h
llmeshrepository.h
llmimetypes.h
llmorphview.h
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 64122bbb6c..92a241857e 100755..100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -48,6 +48,6 @@
-->
</array>
</map>
- </array>
+ </array>
</map>
</llsd>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5e42fc29f7..7497a273ea 100755..100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5179,7 +5179,7 @@
<key>Comment</key>
<string>Center the focal point of the minimap.</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index e02a7b405b..2cef8f2a5d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -2093,7 +2093,6 @@ uniform sampler2D diffuseMap;
uniform vec2 rcp_screen_res;
uniform vec4 rcp_frame_opt;
uniform vec4 rcp_frame_opt2;
-uniform vec2 screen_res;
VARYING vec2 vary_fragcoord;
VARYING vec2 vary_tc;
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 777d54a5c3..4ea139617d 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -312,35 +312,65 @@ NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
-NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
+
+
+NVIDIA GT 120M .*NVIDIA .*GT *120M.* 2 1
+NVIDIA GT 130M .*NVIDIA .*GT *130M.* 2 1
+NVIDIA GT 140M .*NVIDIA .*GT *140M.* 2 1
+NVIDIA GT 150M .*NVIDIA .*GT *150M.* 2 1
+NVIDIA GT 160M .*NVIDIA .*GT *160M.* 2 1
+NVIDIA GT 220M .*NVIDIA .*GT *220M.* 2 1
+NVIDIA GT 230M .*NVIDIA .*GT *230M.* 2 1
+NVIDIA GT 240M .*NVIDIA .*GT *240M.* 2 1
+NVIDIA GT 250M .*NVIDIA .*GT *250M.* 2 1
+NVIDIA GT 260M .*NVIDIA .*GT *260M.* 2 1
+NVIDIA GT 320M .*NVIDIA .*GT *320M.* 2 1
+NVIDIA GT 325M .*NVIDIA .*GT *325M.* 0 1
+NVIDIA GT 330M .*NVIDIA .*GT *330M.* 3 1
+NVIDIA GT 335M .*NVIDIA .*GT *335M.* 1 1
+NVIDIA GT 340M .*NVIDIA .*GT *340M.* 2 1
+NVIDIA GT 415M .*NVIDIA .*GT *415M.* 2 1
+NVIDIA GT 420M .*NVIDIA .*GT *420M.* 2 1
+NVIDIA GT 425M .*NVIDIA .*GT *425M.* 3 1
+NVIDIA GT 430M .*NVIDIA .*GT *430M.* 3 1
+NVIDIA GT 435M .*NVIDIA .*GT *435M.* 3 1
+NVIDIA GT 440M .*NVIDIA .*GT *440M.* 3 1
+NVIDIA GT 445M .*NVIDIA .*GT *445M.* 3 1
+NVIDIA GT 450M .*NVIDIA .*GT *450M.* 3 1
+NVIDIA GT 520M .*NVIDIA .*GT *52.M.* 3 1
+NVIDIA GT 530M .*NVIDIA .*GT *530M.* 3 1
+NVIDIA GT 540M .*NVIDIA .*GT *54.M.* 3 1
+NVIDIA GT 550M .*NVIDIA .*GT *550M.* 3 1
+NVIDIA GT 555M .*NVIDIA .*GT *555M.* 3 1
NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
-NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
-NVIDIA GT 140M .*NVIDIA .*GT *140(M)?.* 2 1
-NVIDIA GT 150M .*NVIDIA .*GT(S)? *150(M)?.* 2 1
-NVIDIA GT 160M .*NVIDIA .*GT *160(M)?.* 2 1
-NVIDIA GT 220M .*NVIDIA .*GT *220(M)?.* 2 1
-NVIDIA GT 230M .*NVIDIA .*GT *230(M)?.* 2 1
-NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
-NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
-NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
-NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
-NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
-NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
-NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
-NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
-NVIDIA GT 425M .*NVIDIA .*GT *425(M)?.* 3 1
-NVIDIA GT 430M .*NVIDIA .*GT *430(M)?.* 3 1
-NVIDIA GT 435M .*NVIDIA .*GT *435(M)?.* 3 1
-NVIDIA GT 440M .*NVIDIA .*GT *440(M)?.* 3 1
-NVIDIA GT 445M .*NVIDIA .*GT *445(M)?.* 3 1
-NVIDIA GT 450M .*NVIDIA .*GT *450(M)?.* 3 1
-NVIDIA GT 520M .*NVIDIA .*GT *52.(M)?.* 3 1
-NVIDIA GT 530M .*NVIDIA .*GT *530(M)?.* 3 1
-NVIDIA GT 540M .*NVIDIA .*GT *54.(M)?.* 3 1
-NVIDIA GT 550M .*NVIDIA .*GT *550(M)?.* 3 1
-NVIDIA GT 555M .*NVIDIA .*GT *555(M)?.* 3 1
+NVIDIA GT 130 .*NVIDIA .*GT *130.* 2 1
+NVIDIA GT 140 .*NVIDIA .*GT *140.* 2 1
+NVIDIA GT 150 .*NVIDIA .*GT *150.* 2 1
+NVIDIA GT 160 .*NVIDIA .*GT *160.* 2 1
+NVIDIA GT 220 .*NVIDIA .*GT *220.* 2 1
+NVIDIA GT 230 .*NVIDIA .*GT *230.* 2 1
+NVIDIA GT 240 .*NVIDIA .*GT *240.* 2 1
+NVIDIA GT 250 .*NVIDIA .*GT *250.* 2 1
+NVIDIA GT 260 .*NVIDIA .*GT *260.* 2 1
+NVIDIA GT 320 .*NVIDIA .*GT *320.* 2 1
+NVIDIA GT 325 .*NVIDIA .*GT *325.* 0 1
+NVIDIA GT 330 .*NVIDIA .*GT *330.* 3 1
+NVIDIA GT 335 .*NVIDIA .*GT *335.* 1 1
+NVIDIA GT 340 .*NVIDIA .*GT *340.* 2 1
+NVIDIA GT 415 .*NVIDIA .*GT *415.* 2 1
+NVIDIA GT 420 .*NVIDIA .*GT *420.* 2 1
+NVIDIA GT 425 .*NVIDIA .*GT *425.* 3 1
+NVIDIA GT 430 .*NVIDIA .*GT *430.* 3 1
+NVIDIA GT 435 .*NVIDIA .*GT *435.* 3 1
+NVIDIA GT 440 .*NVIDIA .*GT *440.* 3 1
+NVIDIA GT 445 .*NVIDIA .*GT *445.* 3 1
+NVIDIA GT 450 .*NVIDIA .*GT *450.* 3 1
+NVIDIA GT 520 .*NVIDIA .*GT *52..* 3 1
+NVIDIA GT 530 .*NVIDIA .*GT *530.* 3 1
+NVIDIA GT 540 .*NVIDIA .*GT *54..* 3 1
+NVIDIA GT 550 .*NVIDIA .*GT *550.* 3 1
+NVIDIA GT 555 .*NVIDIA .*GT *555.* 3 1
+NVIDIA GTS 150 .*NVIDIA .*GTS*150(M)?.* 2 1
NVIDIA GTS 160M .*NVIDIA .*GT(S)? *160(M)?.* 2 1
NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 3 1
NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 3 1
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e441f21f90..e441f21f90 100755..100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 5932be21c6..5932be21c6 100755..100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 6d67e098a6..6d67e098a6 100755..100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c9458857d1..c3ac615169 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -730,10 +730,6 @@ bool LLAppViewer::init()
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::initClass();
-#endif
-
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
LLCurl::initClass(gSavedSettings.getF32("CurlRequestTimeOut"),
@@ -800,9 +796,6 @@ bool LLAppViewer::init()
//////////////////////////////////////////////////////////////////////////////
// *FIX: The following code isn't grouped into functions yet.
- // Statistics / debug timer initialization
- init_statistics();
-
//
// Various introspection concerning the libs we're using - particularly
// the libs involved in getting to a full login screen.
@@ -1188,9 +1181,10 @@ static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback");
static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot");
static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update");
+LLFastTimer::DeclareTimer FTM_FRAME("Frame", true);
+
bool LLAppViewer::mainLoop()
{
- LLMemType mt1(LLMemType::MTYPE_MAIN);
mMainloopTimeout = new LLWatchdogTimeout();
//-------------------------------------------
@@ -1226,7 +1220,8 @@ bool LLAppViewer::mainLoop()
// Handle messages
while (!LLApp::isExiting())
{
- LLFastTimer::nextFrame(); // Should be outside of any timer instances
+ LLFastTimer _(FTM_FRAME);
+ LLFastTimer::nextFrame();
//clear call stack records
llclearcallstacks;
@@ -1290,7 +1285,6 @@ bool LLAppViewer::mainLoop()
&& (gHeadlessClient || !gViewerWindow->getShowProgress())
&& !gFocusMgr.focusLocked())
{
- LLMemType mjk(LLMemType::MTYPE_JOY_KEY);
joystick->scanJoystick();
gKeyboard->scanKeyboard();
}
@@ -1304,7 +1298,6 @@ bool LLAppViewer::mainLoop()
if (gAres != NULL && gAres->isInitialized())
{
- LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP);
pingMainloopTimeout("Main:ServicePump");
LLFastTimer t4(FTM_PUMP);
{
@@ -1354,7 +1347,6 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
- LLMemType mt_sleep(LLMemType::MTYPE_SLEEP);
LLFastTimer t2(FTM_SLEEP);
// yield some time to the os based on command line option
@@ -1918,10 +1910,6 @@ bool LLAppViewer::cleanup()
LLMetricPerformanceTesterBasic::cleanClass() ;
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::cleanupClass();
-#endif
-
llinfos << "Cleaning up Media and Textures" << llendflush;
//Note:
@@ -3161,8 +3149,6 @@ void LLAppViewer::writeSystemInfo()
LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
- LL_INFOS("SystemInfo") << "Timers: " << LLFastTimer::sClockType << LL_ENDL;
-
writeDebugInfo(); // Save out debug_info.log early, in case of crash.
}
@@ -4147,7 +4133,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
///////////////////////////////////////////////////////
void LLAppViewer::idle()
{
- LLMemType mt_idle(LLMemType::MTYPE_IDLE);
pingMainloopTimeout("Main:Idle");
// Update frame timers
@@ -4260,7 +4245,6 @@ void LLAppViewer::idle()
// of SEND_STATS_PERIOD so that the initial stats report will
// be sent immediately.
static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD);
- reset_statistics();
// Update session stats every large chunk of time
// *FIX: (???) SAMANTHA
@@ -4320,7 +4304,7 @@ void LLAppViewer::idle()
idle_afk_check();
// Update statistics for this frame
- update_statistics(gFrameCount);
+ update_statistics();
}
////////////////////////////////////////
@@ -4746,7 +4730,6 @@ static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"
void LLAppViewer::idleNetwork()
{
- LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK);
pingMainloopTimeout("idleNetwork");
gObjectList.mNumNewObjects = 0;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index ae3c795d1e..cdf4426469 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -41,6 +41,9 @@ class LLTextureFetch;
class LLWatchdogTimeout;
class LLUpdaterService;
+extern LLFastTimer::DeclareTimer FTM_FRAME;
+
+
class LLAppViewer : public LLApp
{
public:
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index e8d8efdc0a..8695652168 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -31,7 +31,6 @@
#include "llcommandlineparser.h"
#include "lldiriterator.h"
-#include "llmemtype.h"
#include "llurldispatcher.h" // SLURL from other app instance
#include "llviewernetwork.h"
#include "llviewercontrol.h"
@@ -71,8 +70,6 @@ static void exceptionTerminateHandler()
int main( int argc, char **argv )
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index c2916717bd..4d340cafa9 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -33,8 +33,6 @@
#include "llappviewermacosx.h"
#include "llcommandlineparser.h"
-#include "llmemtype.h"
-
#include "llviewernetwork.h"
#include "llviewercontrol.h"
#include "llmd5.h"
@@ -67,8 +65,6 @@ namespace
int main( int argc, char **argv )
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 53c77fa22e..3956e88ced 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -32,7 +32,6 @@
#include "llappviewerwin32.h"
-#include "llmemtype.h"
#include "llwindowwin32.h" // *FIX: for setting gIconResource.
#include "llgl.h"
@@ -117,8 +116,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
#endif // _DEBUG
#endif // INCLUDE_VLD
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
const S32 MAX_HEAPS = 255;
DWORD heap_enable_lfh_error[MAX_HEAPS];
S32 num_heaps = 0;
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 29b1d23d7d..aeecf054b8 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -30,7 +30,6 @@
// library includes
#include "llfasttimerview.h"
-#include "llmemoryview.h"
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
@@ -38,7 +37,6 @@
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
-#include "llmemoryview.h"
#include "llsceneview.h"
#include "llviewertexture.h"
#include "llfloaterreg.h"
@@ -103,13 +101,6 @@ void LLDebugView::init()
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
- LLMemoryView::Params mp;
- mp.name("memory");
- mp.rect(r);
- mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
- mp.visible(false);
- mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp);
- addChild(mMemoryView);
r.set(150, rect.getHeight() - 50, 820, 100);
LLTextureView::Params tvp;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4eda2b92b3..7f6ed3f50e 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -254,11 +254,17 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
return count;
}
+static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true);
+
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
- LLFace *face = new LLFace(this, mVObjp);
+ LLFace *face;
+ {
+ LLFastTimer t(FTM_ALLOCATE_FACE);
+ face = new LLFace(this, mVObjp);
+ }
+
if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl;
if (face)
@@ -280,10 +286,12 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
-
LLFace *face;
- face = new LLFace(this, mVObjp);
+
+ {
+ LLFastTimer t(FTM_ALLOCATE_FACE);
+ face = new LLFace(this, mVObjp);
+ }
face->setTEOffset(mFaces.size());
face->setTexture(texturep);
@@ -763,8 +771,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
void LLDrawable::updateTexture()
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
-
if (isDead())
{
llwarns << "Dead drawable updating texture!" << llendl;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index b1e32bdb5b..4608d16fec 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -38,7 +38,6 @@
#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
-#include "llmemtype.h"
#include "lldarray.h"
#include "llviewerobject.h"
#include "llrect.h"
@@ -87,7 +86,6 @@ public:
}
LLDrawable() { init(); }
- MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE);
void markDead(); // Mark this drawable as dead
BOOL isDead() const { return isState(DEAD); }
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 730ad1a364..59161d063e 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1272,6 +1272,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
face->setGeomIndex(0);
face->setIndicesIndex(0);
+ //rigged faces do not batch textures
+ face->setTextureIndex(255);
+
if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())
{ //make a new buffer
if (sShaderLevel > 0)
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index a264eae302..1b0b11298c 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1192,7 +1192,7 @@ static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create");
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 7a4d711d4e..216cf003e1 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -75,6 +75,7 @@ protected:
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLDriverParam : public LLViewerVisualParam
{
friend class LLPhysicsMotion; // physics motion needs to access driven params directly.
@@ -83,6 +84,16 @@ public:
LLDriverParam(LLWearable *wearablep);
~LLDriverParam();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
// This sets mInfo and calls initialization functions
@@ -116,13 +127,13 @@ protected:
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
- LLVector4a mDefaultVec; // temp holder
+ LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
typedef std::vector<LLDrivenEntry> entry_list_t;
entry_list_t mDriven;
LLViewerVisualParam* mCurrentDistortionParam;
// Backlink only; don't make this an LLPointer.
LLVOAvatar* mAvatarp;
LLWearable* mWearablep;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLDRIVERPARAM_H
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4a0c94df33..c2c9183e57 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -262,8 +262,6 @@ void LLFace::setPool(LLFacePool* pool)
void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (!new_pool)
{
llerrs << "Setting pool to null!" << llendl;
@@ -441,8 +439,6 @@ U16 LLFace::getGeometryAvatar(
LLStrider<F32> &vertex_weights,
LLStrider<LLVector4> &clothing_weights)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount);
@@ -458,8 +454,6 @@ U16 LLFace::getGeometryAvatar(
U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount);
@@ -769,8 +763,6 @@ bool less_than_max_mag(const LLVector4a& vec)
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
{
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 9664aa7dbe..4dfb93f1bc 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -95,7 +95,6 @@ LLFastTimerView::LLFastTimerView(const LLSD& key)
mHoverBarIndex = -1;
FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
mPrintStats = -1;
- mAverageCyclesPerTimer = 0;
}
void LLFastTimerView::onPause()
@@ -161,7 +160,7 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
@@ -258,7 +257,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it, ++i)
{
@@ -379,12 +378,6 @@ void LLFastTimerView::draw()
S32 xleft = margin;
S32 ytop = margin;
- mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0
- ? 0
- : llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
- LLFastTimer::sTimerCycles = 0;
- LLFastTimer::sTimerCalls = 0;
-
// Draw some help
{
@@ -392,10 +385,6 @@ void LLFastTimerView::draw()
y = height - ytop;
texth = (S32)LLFontGL::getFontMonospace()->getLineHeight();
-#if TIME_FAST_TIMERS
- tdesc = llformat("Cycles per timer call: %d", mAverageCyclesPerTimer);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-#else
char modedesc[][32] = {
"2 x Average ",
"Max ",
@@ -419,7 +408,6 @@ void LLFastTimerView::draw()
LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"),
0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-#endif
y -= (texth + 2);
}
@@ -431,11 +419,11 @@ void LLFastTimerView::draw()
y -= (texth + 2);
- sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey;
+ sTimerColors[&getFrameTimer()] = LLColor4::grey;
F32 hue = 0.f;
- for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != timer_tree_iterator_t();
++it)
{
@@ -460,7 +448,7 @@ void LLFastTimerView::draw()
S32 cur_line = 0;
ft_display_idx.clear();
std::map<LLFastTimer::NamedTimer*, S32> display_line;
- for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != timer_tree_iterator_t();
++it)
{
@@ -526,6 +514,7 @@ void LLFastTimerView::draw()
while(!is_child_of_hover_item && next_parent)
{
is_child_of_hover_item = (mHoverID == next_parent);
+ if (next_parent->getParent() == next_parent) break;
next_parent = next_parent->getParent();
}
@@ -570,7 +559,7 @@ void LLFastTimerView::draw()
U64 totalticks;
if (!LLFastTimer::sPauseHistory)
{
- U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex);
+ U64 ticks = getFrameTimer().getHistoricalCount(mScrollIndex);
if (LLFastTimer::getCurFrameIndex() >= 10)
{
@@ -610,7 +599,7 @@ void LLFastTimerView::draw()
totalticks = 0;
for (S32 j=0; j<histmax; j++)
{
- U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(j);
+ U64 ticks = getFrameTimer().getHistoricalCount(j);
if (ticks > totalticks)
totalticks = ticks;
@@ -716,7 +705,7 @@ void LLFastTimerView::draw()
LLFastTimer::NamedTimer* prev_id = NULL;
S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it, ++i)
{
@@ -793,6 +782,7 @@ void LLFastTimerView::draw()
while(!is_child_of_hover_item && next_parent)
{
is_child_of_hover_item = (mHoverID == next_parent);
+ if (next_parent->getParent() == next_parent) break;
next_parent = next_parent->getParent();
}
@@ -879,7 +869,7 @@ void LLFastTimerView::draw()
}
U64 cur_max = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
@@ -980,7 +970,7 @@ void LLFastTimerView::draw()
{
std::string legend_stat;
bool first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
@@ -1002,7 +992,7 @@ void LLFastTimerView::draw()
std::string timer_stat;
first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
@@ -1563,3 +1553,9 @@ void LLFastTimerView::onClickCloseBtn()
setVisible(false);
}
+LLFastTimer::NamedTimer& LLFastTimerView::getFrameTimer()
+{
+ return FTM_FRAME.getNamedTimer();
+}
+
+
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index a349e7ad4c..5766cfa0b0 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -46,6 +46,7 @@ private:
static LLSD analyzePerformanceLogDefault(std::istream& is) ;
static void exportCharts(const std::string& base, const std::string& target);
void onPause();
+ LLFastTimer::NamedTimer& getFrameTimer();
public:
@@ -90,7 +91,6 @@ private:
S32 mHoverBarIndex;
LLFrameTimer mHighlightTimer;
S32 mPrintStats;
- S32 mAverageCyclesPerTimer;
LLRect mGraphRect;
};
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index ef412a6bbf..a37e27363f 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -48,7 +48,7 @@ std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
-static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update");
+static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// LLFlexibleObjectData::pack/unpack now in llprimitive.cpp
@@ -364,7 +364,7 @@ void LLVolumeImplFlexible::doIdleUpdate()
if (visible)
{
if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
- mVO->getPixelArea() > 256.f)
+ pixel_area > 256.f)
{
U32 id;
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 90f40628a8..39b6e465f3 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -336,8 +336,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
// This slices the object into what we're concerned about on the viewer.
// The simulator will take the permissions and transfer ownership.
LLPointer<LLViewerInventoryItem> task_item =
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 21b58d3e3d..c85d048c5a 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -330,6 +330,10 @@ void LLFloaterCamera::onClose(bool app_quitting)
//We don't care of camera mode if app is quitting
if(app_quitting)
return;
+ // It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so
+ // to avoid seeing an empty floater when reopening the control.
+ if (mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA)
+ mCurrMode = CAMERA_CTRL_MODE_PAN;
// When mCurrMode is in CAMERA_CTRL_MODE_PAN
// switchMode won't modify mPrevMode, so force it here.
// It is needed to correctly return to previous mode on open, see EXT-2727.
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 05d73c2416..d6ebe44daa 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -172,9 +172,9 @@ void LLFloaterColorPicker::createUI ()
//
void LLFloaterColorPicker::showUI ()
{
+ openFloater(getKey());
setVisible ( TRUE );
setFocus ( TRUE );
- openFloater(getKey());
// HACK: if system color picker is required - close the SL one we made and use default system dialog
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index c37798c330..d0c22d25f2 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -33,6 +33,7 @@
#include "llerror.h"
#include "llrect.h"
#include "llstring.h"
+#include "llstat.h"
// project includes
#include "lluictrlfactory.h"
@@ -83,7 +84,8 @@ BOOL LLFloaterJoystick::postBuild()
for (U32 i = 0; i < 6; i++)
{
- mAxisStats[i] = new LLStat(4);
+ std::string stat_name(llformat("Joystick axis %d", i));
+ mAxisStats[i] = new LLStat(stat_name, 4);
std::string axisname = llformat("axis%d", i);
mAxisStatsBar[i] = getChild<LLStatBar>(axisname);
if (mAxisStatsBar[i])
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 55f3d548ec..be743d57d2 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -783,8 +783,9 @@ void LLPanelLandGeneral::refresh()
mBtnReleaseLand->setEnabled( can_release );
}
- BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
+ BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
mBtnBuyPass->setEnabled(use_pass);
+
}
}
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index a65e9e911a..473e2938be 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -122,16 +122,13 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
- // If we're not tracking a beacon already, double-click will set one
- if (!LLTracker::isTracking(NULL))
+ LLTracker::stopTracking(NULL);
+ LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ if (world_map)
{
- LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
- if (world_map)
- {
- world_map->trackLocation(pos_global);
- }
+ world_map->trackLocation(pos_global);
}
-
+
if (gSavedSettings.getBOOL("DoubleClickTeleport"))
{
// If DoubleClickTeleport is on, double clicking the minimap will teleport there
@@ -249,3 +246,8 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
mMap->setScale(scale);
}
}
+
+LLFloaterMap* LLFloaterMap::getInstance()
+{
+ return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map");
+}
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 8a1b965e62..ff2fb20535 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -39,6 +39,7 @@ class LLFloaterMap : public LLFloater
{
public:
LLFloaterMap(const LLSD& key);
+ static LLFloaterMap* getInstance();
virtual ~LLFloaterMap();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fce0b7c9c9..e831f9de7c 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3205,6 +3205,7 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags)
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
+ const LLUUID favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (lost_and_found_id == mUUID)
{
@@ -3218,7 +3219,10 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags)
mDisabledItems.push_back(std::string("New Clothes"));
mDisabledItems.push_back(std::string("New Body Parts"));
}
-
+ if (favorites == mUUID)
+ {
+ mDisabledItems.push_back(std::string("New Folder"));
+ }
if(trash_id == mUUID)
{
// This is the trash.
@@ -4658,6 +4662,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Share"));
}
+ if ((flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Open"));
+ }
addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
@@ -5624,7 +5632,8 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Wearable Edit"));
- if ((flags & FIRST_SELECTED_ITEM) == 0)
+ bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID());
+ if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable)
{
disabled_items.push_back(std::string("Wearable Edit"));
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e98d3f88a6..68732024de 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -959,7 +959,6 @@ void LLSaveFolderState::setApply(BOOL apply)
void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER);
LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener();
if(!bridge) return;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 6e23d7c701..6e23d7c701 100755..100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 05c81957c6..f7567baa2b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -44,6 +44,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llsidepanelinventory.h"
+#include "lltrans.h"
#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
@@ -191,8 +192,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD);
-
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
buildFolderView(params);
@@ -975,7 +974,6 @@ bool LLInventoryPanel::beginIMSession()
std::set<LLUUID> selected_items = mFolderRoot->getSelectionList();
std::string name;
- static int session_num = 1;
LLDynamicArray<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
@@ -1055,7 +1053,7 @@ bool LLInventoryPanel::beginIMSession()
if (name.empty())
{
- name = llformat("Session %d", session_num++);
+ name = LLTrans::getString("conference-title");
}
LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
deleted file mode 100644
index c0a323d6cb..0000000000
--- a/indra/newview/llmemoryview.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * @file llmemoryview.cpp
- * @brief LLMemoryView class implementation
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llmemoryview.h"
-
-#include "llappviewer.h"
-#include "llallocator_heap_profile.h"
-#include "llgl.h" // LLGLSUIDefault
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-
-#include <sstream>
-#include <boost/algorithm/string/split.hpp>
-
-#include "llmemory.h"
-
-LLMemoryView::LLMemoryView(const LLMemoryView::Params& p)
-: LLView(p),
- mPaused(FALSE),
- //mDelay(120),
- mAlloc(NULL)
-{
-}
-
-LLMemoryView::~LLMemoryView()
-{
-}
-
-BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask)
-{
- if (mask & MASK_SHIFT)
- {
- }
- else if (mask & MASK_CONTROL)
- {
- }
- else
- {
- mPaused = !mPaused;
- }
- return TRUE;
-}
-
-BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask)
-{
- return TRUE;
-}
-
-
-BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask)
-{
- return FALSE;
-}
-
-void LLMemoryView::refreshProfile()
-{
- /*
- LLAllocator & alloc = LLAppViewer::instance()->getAllocator();
- if(alloc.isProfiling()) {
- std::string profile_text = alloc.getRawProfile();
-
- boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to<llwchar>(), '\n', _1));
- } else {
- mLines.clear();
- }
- */
- if (mAlloc == NULL) {
- mAlloc = &LLAppViewer::instance()->getAllocator();
- }
-
- mLines.clear();
-
- if(mAlloc->isProfiling())
- {
- const LLAllocatorHeapProfile &prof = mAlloc->getProfile();
- for(size_t i = 0; i < prof.mLines.size(); ++i)
- {
- std::stringstream ss;
- ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: ";
- for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k)
- {
- ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " ";
- }
- mLines.push_back(utf8string_to_wstring(ss.str()));
- }
- }
-}
-
-void LLMemoryView::draw()
-{
- const S32 UPDATE_INTERVAL = 60;
- const S32 MARGIN_AMT = 10;
- static S32 curUpdate = UPDATE_INTERVAL;
- static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black);
-
- // setup update interval
- if (curUpdate >= UPDATE_INTERVAL)
- {
- refreshProfile();
- curUpdate = 0;
- }
- curUpdate++;
-
- // setup window properly
- S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
- S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f);
- setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height));
-
- // setup window color
- F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
- LLColor4 color = s_console_color;
- color.mV[VALPHA] *= console_opacity;
-
- LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(0, height, width, 0, color);
-
- LLFontGL * font = LLFontGL::getFontSansSerifSmall();
-
- // draw remaining lines
- F32 y_pos = 0.f;
- F32 y_off = 0.f;
-
- F32 line_height = font->getLineHeight();
- S32 target_width = width - 2 * MARGIN_AMT;
-
- // cut off lines on bottom
- U32 max_lines = U32((height - 2 * line_height) / line_height);
- y_pos = height - MARGIN_AMT - line_height;
- y_off = 0.f;
-
-#if !MEM_TRACK_MEM
- std::vector<LLWString>::const_iterator end = mLines.end();
- if(mLines.size() > max_lines) {
- end = mLines.begin() + max_lines;
- }
- for (std::vector<LLWString>::const_iterator i = mLines.begin(); i != end; ++i)
- {
- font->render(*i, 0, MARGIN_AMT, y_pos - y_off,
- LLColor4::white,
- LLFontGL::LEFT,
- LLFontGL::BASELINE,
- LLFontGL::NORMAL,
- LLFontGL::DROP_SHADOW,
- S32_MAX,
- target_width
- );
- y_off += line_height;
- }
-
-#else
- LLMemTracker::getInstance()->preDraw(mPaused) ;
-
- {
- F32 x_pos = MARGIN_AMT ;
- U32 lines = 0 ;
- const char* str = LLMemTracker::getInstance()->getNextLine() ;
- while(str != NULL)
- {
- lines++ ;
- font->renderUTF8(str, 0, x_pos, y_pos - y_off,
- LLColor4::white,
- LLFontGL::LEFT,
- LLFontGL::BASELINE,
- LLFontGL::NORMAL,
- LLFontGL::DROP_SHADOW,
- S32_MAX,
- target_width,
- NULL, FALSE);
-
- str = LLMemTracker::getInstance()->getNextLine() ;
- y_off += line_height;
-
- if(lines >= max_lines)
- {
- lines = 0 ;
- x_pos += 512.f ;
- if(x_pos + 512.f > target_width)
- {
- break ;
- }
-
- y_pos = height - MARGIN_AMT - line_height;
- y_off = 0.f;
- }
- }
- }
-
- LLMemTracker::getInstance()->postDraw() ;
-#endif
-
-#if MEM_TRACK_TYPE
-
- S32 left, top, right, bottom;
- S32 x, y;
-
- S32 margin = 10;
- S32 texth = LLFontGL::getFontMonospace()->getLineHeight();
-
- S32 xleft = margin;
- S32 ytop = height - margin;
- S32 labelwidth = 0;
- S32 maxmaxbytes = 1;
-
- // Make sure all timers are accounted for
- // Set 'MT_OTHER' to unaccounted ticks last frame
- {
- S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES];
- for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++)
- {
- display_memtypes[i] = 0;
- }
- for (S32 i=0; i < MTV_DISPLAY_NUM; i++)
- {
- S32 tidx = mtv_display_table[i].memtype;
- display_memtypes[tidx]++;
- }
- LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0;
- LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0;
- for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++)
- {
- if (display_memtypes[tidx] == 0)
- {
- LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx];
- LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx];
- }
- }
- }
-
- // Labels
- {
- y = ytop;
- S32 peak = 0;
- for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
- {
- x = xleft;
-
- int tidx = mtv_display_table[i].memtype;
- S32 bytes = LLMemType::sMemCount[tidx];
- S32 maxbytes = LLMemType::sMaxMemCount[tidx];
- maxmaxbytes = llmax(maxbytes, maxmaxbytes);
- peak += maxbytes;
- S32 mbytes = bytes >> 20;
-
- tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-
- y -= (texth + 2);
-
- S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc);
- if (textw > labelwidth)
- labelwidth = textw;
- }
-
- S32 num_avatars = 0;
- S32 num_motions = 0;
- S32 num_loading_motions = 0;
- S32 num_loaded_motions = 0;
- S32 num_active_motions = 0;
- S32 num_deprecated_motions = 0;
- for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
- {
- num_avatars++;
- (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
- }
-
- x = xleft;
- tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d",
- LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10,
- num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
- }
-
- // Bars
- y = ytop;
- labelwidth += 8;
- S32 barw = width - labelwidth - xleft - margin;
- for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
- {
- x = xleft + labelwidth;
-
- int tidx = mtv_display_table[i].memtype;
- S32 bytes = LLMemType::sMemCount[tidx];
- F32 frac = (F32)bytes / (F32)maxmaxbytes;
- S32 w = (S32)(frac * (F32)barw);
- left = x; right = x + w;
- top = y; bottom = y - texth;
- gl_rect_2d(left, top, right, bottom, *mtv_display_table[i].color);
-
- S32 maxbytes = LLMemType::sMaxMemCount[tidx];
- F32 frac2 = (F32)maxbytes / (F32)maxmaxbytes;
- S32 w2 = (S32)(frac2 * (F32)barw);
- left = x + w + 1; right = x + w2;
- top = y; bottom = y - texth;
- LLColor4 tcolor = *mtv_display_table[i].color;
- tcolor.setAlpha(.5f);
- gl_rect_2d(left, top, right, bottom, tcolor);
-
- y -= (texth + 2);
- }
-
- dumpData();
-
-#endif
-
- LLView::draw();
-}
diff --git a/indra/newview/llmemoryview.h b/indra/newview/llmemoryview.h
deleted file mode 100644
index dc4849a9c4..0000000000
--- a/indra/newview/llmemoryview.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file llmemoryview.h
- * @brief LLMemoryView class definition
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLMEMORYVIEW_H
-#define LL_LLMEMORYVIEW_H
-
-#include "llview.h"
-
-class LLAllocator;
-
-class LLMemoryView : public LLView
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLView::Params>
- {
- Params()
- {
- changeDefault(mouse_opaque, true);
- changeDefault(visible, false);
- }
- };
- LLMemoryView(const LLMemoryView::Params&);
- virtual ~LLMemoryView();
-
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual void draw();
-
- void refreshProfile();
-
-private:
- std::vector<LLWString> mLines;
- LLAllocator* mAlloc;
- BOOL mPaused ;
-
-};
-
-#endif
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index f8f0f7d243..c00dc4bc89 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -203,7 +203,12 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
sendChat(CHAT_TYPE_SHOUT);
handled = TRUE;
}
-
+ else if (KEY_RETURN == key && mask == MASK_SHIFT)
+ {
+ // whisper
+ sendChat(CHAT_TYPE_WHISPER);
+ handled = TRUE;
+ }
return handled;
}
@@ -390,12 +395,6 @@ void LLNearbyChatBar::sendChat( EChatType type )
gAgent.stopTyping();
- // If the user wants to stop chatting on hitting return, lose focus
- // and go out of chat mode.
- if (gSavedSettings.getBOOL("CloseChatOnReturn"))
- {
- stopChat();
- }
}
void LLNearbyChatBar::showNearbyChatPanel(bool show)
@@ -446,7 +445,12 @@ void LLNearbyChatBar::onChatBoxCommit()
{
sendChat(CHAT_TYPE_NORMAL);
}
-
+ // If the user wants to stop chatting on hitting return, lose focus
+ // and go out of chat mode.
+ if (gSavedSettings.getBOOL("CloseChatOnReturn"))
+ {
+ stopChat();
+ }
gAgent.stopTyping();
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ef5ef2ddc8..c15b6bd0d3 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -117,6 +117,8 @@ public:
registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this));
registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
+ registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList));
+ registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this));
@@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const
}
}
+void LLOutfitsList::collapse_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && tab->isExpanded())
+ {
+ tab->changeOpenClose(true);
+ }
+ }
+}
+
+void LLOutfitsList::expand_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && !tab->isExpanded())
+ {
+ tab->changeOpenClose(false);
+ }
+ }
+}
+
boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb)
{
return mSelectionChangeSignal.connect(cb);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index a0598737f1..2e3fb3f488 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -108,6 +108,16 @@ public:
*/
bool hasItemSelected();
+ /**
+ Collapses all outfit accordions.
+ */
+ void collapse_all_folders();
+ /**
+ Expands all outfit accordions.
+ */
+ void expand_all_folders();
+
+
private:
void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 68a3b6d1cd..d6fccb9705 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -418,12 +418,13 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_
bool LLLandmarksPanel::isLandmarkSelected() const
{
LLFolderViewItem* current_item = getCurSelectedItem();
- if(current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- return true;
- }
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK;
+}
- return false;
+bool LLLandmarksPanel::isFolderSelected() const
+{
+ LLFolderViewItem* current_item = getCurSelectedItem();
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY;
}
bool LLLandmarksPanel::isReceivedFolderSelected() const
@@ -720,7 +721,7 @@ void LLLandmarksPanel::initListCommandsHandlers()
void LLLandmarksPanel::updateListCommands()
{
bool add_folder_enabled = isActionEnabled("category");
- bool trash_enabled = isActionEnabled("delete");
+ bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected());
// keep Options & Add Landmark buttons always enabled
mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled);
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index b2f4e92473..4e787317ba 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -84,6 +84,7 @@ protected:
* @return true - if current selected panel is not null and selected item is a landmark
*/
bool isLandmarkSelected() const;
+ bool isFolderSelected() const;
bool isReceivedFolderSelected() const;
void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
LLFolderViewItem* getCurSelectedItem() const;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9f3273da2d..fabb8daa6e 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -105,7 +105,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mMenuAdd(NULL),
mNeedUploadCost(true)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT);
// Menu Callbacks (non contex menus)
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this));
@@ -604,7 +603,6 @@ void LLPanelMainInventory::setFilterTextFromFilter()
void LLPanelMainInventory::toggleFindOptions()
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE);
LLFloater *floater = getFinder();
if (!floater)
{
@@ -726,7 +724,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
void LLFloaterInventoryFinder::draw()
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW);
U64 filter = 0xffffffffffffffffULL;
BOOL filtered_by_all_types = TRUE;
@@ -1177,6 +1174,8 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "share")
{
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item) return FALSE;
LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
return parent ? parent->canShare() : FALSE;
}
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 6d321d4716..6c2a01fc82 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -366,6 +366,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
if (key.size() != 0)
{
+ isLandmarkEditModeOn = false;
std::string key_type = key["type"].asString();
if (key_type == LANDMARK_TAB_INFO_TYPE)
{
@@ -392,7 +393,6 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mPlaceInfoType = key_type;
mPosGlobal.setZero();
mItem = NULL;
- isLandmarkEditModeOn = false;
togglePlaceInfoPanel(TRUE);
if (mPlaceInfoType == AGENT_INFO_TYPE)
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index c63d89fc98..0756faf5c0 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -972,6 +972,11 @@ void LLTeleportHistoryPanel::onCollapseAllFolders()
mItemContainers.get(n)->setDisplayChildren(false);
}
mHistoryAccordion->arrange();
+
+ if (mLastSelectedFlatlList)
+ {
+ mLastSelectedFlatlList->resetSelection();
+ }
}
void LLTeleportHistoryPanel::onClearTeleportHistory()
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 280cc11179..1830086da2 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -64,9 +64,6 @@ private:
LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0)
{
- LLUICtrl::CommitCallbackRegistry::currentRegistrar()
- .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
-
buildFromFile( "panel_topinfo_bar.xml");
}
@@ -132,6 +129,11 @@ void LLPanelTopInfoBar::handleLoginComplete()
BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
+ if(!LLUICtrl::CommitCallbackRegistry::getValue("TopInfoBar.Action"))
+ {
+ LLUICtrl::CommitCallbackRegistry::currentRegistrar()
+ .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
+ }
show_topinfobar_context_menu(this, x, y);
return TRUE;
}
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 70f3b5335e..e26fcc74bd 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -750,8 +750,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
-
llassert(shared_data);
mSharedData = shared_data;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index ffb11a3f7e..28da230541 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -400,12 +400,24 @@ protected:
// LLPolySkeletalDeformation
// A set of joint scale data for deforming the avatar mesh
//-----------------------------------------------------------------------------
+
+LL_ALIGN_PREFIX(16)
class LLPolySkeletalDistortion : public LLViewerVisualParam
{
public:
LLPolySkeletalDistortion(LLVOAvatar *avatarp);
~LLPolySkeletalDistortion();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; }
// This sets mInfo and calls initialization functions
@@ -426,13 +438,14 @@ public:
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;};
protected:
+ LL_ALIGN_16(LLVector4a mDefaultVec);
+
typedef std::map<LLJoint*, LLVector3> joint_vec_map_t;
joint_vec_map_t mJointScales;
joint_vec_map_t mJointOffsets;
- LLVector4a mDefaultVec;
// Backlink only; don't make this an LLPointer.
LLVOAvatar *mAvatar;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLPOLYMESH_H
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index d25d1420ee..dea8868034 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -73,9 +73,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = (LLVector4a*) ll_aligned_malloc_16(size);
+ mNormals = (LLVector4a*) ll_aligned_malloc_16(size);
+ mBinormals = (LLVector4a*) ll_aligned_malloc_16(size);
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -95,11 +97,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
//-----------------------------------------------------------------------------
LLPolyMorphData::~LLPolyMorphData()
{
- delete [] mVertexIndices;
- delete [] mCoords;
- delete [] mNormals;
- delete [] mBinormals;
+ ll_aligned_free_16(mCoords);
+ ll_aligned_free_16(mNormals);
+ ll_aligned_free_16(mBinormals);
+
delete [] mTexCoords;
+ delete [] mVertexIndices;
}
//-----------------------------------------------------------------------------
@@ -121,9 +124,12 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
//-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = (LLVector4a*) ll_aligned_malloc_16(size);
+ mNormals = (LLVector4a*) ll_aligned_malloc_16(size);
+ mBinormals = (LLVector4a*) ll_aligned_malloc_16(size);
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 46e23b7792..792ce62290 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -41,6 +41,7 @@ class LLWearable;
//-----------------------------------------------------------------------------
// LLPolyMorphData()
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLPolyMorphData
{
public:
@@ -48,6 +49,16 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
@@ -65,9 +76,9 @@ public:
F32 mTotalDistortion; // vertex distortion summed over entire morph
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
- LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
+ LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
-};
+} LL_ALIGN_POSTFIX(16);
//-----------------------------------------------------------------------------
// LLPolyVertexMask()
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 853656905c..d909a218e3 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -456,10 +456,10 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch)
{
LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
-
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
if (panel)
{
+ panel->showOutfitsInventoryPanel();
panel->showWearableEditPanel(wearable, disable_camera_switch);
}
}
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 06c87e57fc..5083478392 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -55,7 +55,7 @@
#include "llviewershadermgr.h"
static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
-static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
+static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition");
const F32 SG_OCCLUSION_FUDGE = 0.25f;
#define SG_DISCARD_TOLERANCE 0.01f
@@ -376,7 +376,6 @@ LLSpatialGroup::~LLSpatialGroup()
}
}
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
clearDrawMap();
clearAtlasList() ;
}
@@ -615,8 +614,6 @@ void LLSpatialGroup::validateDrawMap()
BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
drawablep->updateSpatialExtents();
OctreeNode* parent = mOctreeNode->getOctParent();
@@ -638,7 +635,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (!from_octree)
{
mOctreeNode->insert(drawablep);
@@ -664,7 +660,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc
void LLSpatialGroup::rebuildGeom()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (!isDead())
{
mSpatialPartition->rebuildGeom(this);
@@ -876,7 +871,6 @@ LLSpatialGroup* LLSpatialGroup::getParent()
BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
unbound();
if (mOctreeNode && !from_octree)
{
@@ -913,7 +907,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
void LLSpatialGroup::shift(const LLVector4a &offset)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLVector4a t = mOctreeNode->getCenter();
t.add(offset);
mOctreeNode->setCenter(t);
@@ -968,8 +961,6 @@ void LLSpatialGroup::setState(U32 state)
void LLSpatialGroup::setState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
llassert(state <= LLSpatialGroup::STATE_MASK);
if (mode > STATE_MODE_SINGLE)
@@ -1026,8 +1017,6 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
{
llassert(state <= LLSpatialGroup::STATE_MASK);
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1084,8 +1073,6 @@ public:
void LLSpatialGroup::setOcclusionState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1150,8 +1137,6 @@ public:
void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1203,7 +1188,6 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
ll_assert_aligned(this,16);
sNodeCount++;
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
mViewAngle.splat(0.f);
mLastUpdateViewAngle.splat(-1.f);
@@ -1389,7 +1373,6 @@ BOOL LLSpatialGroup::changeLOD()
void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
addObject(drawablep, FALSE, TRUE);
unbound();
setState(OBJECT_DIRTY);
@@ -1397,14 +1380,12 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep
void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
removeObject(drawable, TRUE);
setState(OBJECT_DIRTY);
}
void LLSpatialGroup::handleDestruction(const TreeNode* node)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
setState(DEAD);
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
@@ -1446,7 +1427,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node)
void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (child->getListenerCount() == 0)
{
new LLSpatialGroup(child, mSpatialPartition);
@@ -1792,7 +1772,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage)
: mRenderByGroup(render_by_group), mBridge(NULL)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
mOcclusionEnabled = TRUE;
mDrawableType = 0;
mPartitionType = LLViewerRegion::PARTITION_NONE;
@@ -1816,8 +1795,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
LLSpatialPartition::~LLSpatialPartition()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
delete mOctree;
mOctree = NULL;
}
@@ -1825,8 +1802,6 @@ LLSpatialPartition::~LLSpatialPartition()
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
drawablep->updateSpatialExtents();
//keep drawable from being garbage collected
@@ -1848,8 +1823,6 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (!curp->removeObject(drawablep))
{
OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
@@ -1866,8 +1839,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
// sanity check submitted by open source user bushing Spatula
// who was seeing crashing here. (See VWR-424 reported by Bunny Mayne)
if (!drawablep)
@@ -1924,7 +1895,6 @@ public:
void LLSpatialPartition::shift(const LLVector4a &offset)
{ //shift octree node bounding boxes by offset
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLSpatialShift shifter(offset);
shifter.traverse(mOctree);
}
@@ -2338,7 +2308,6 @@ public:
void LLSpatialPartition::restoreGL()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
}
void LLSpatialPartition::resetVertexBuffers()
@@ -2381,7 +2350,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
#if LL_OCTREE_PARANOIA_CHECK
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif
@@ -4439,8 +4407,6 @@ void LLSpatialPartition::renderDebug()
sCurMaxTexPriority = 0.f;
}
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
LLGLDisable cullface(GL_CULL_FACE);
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 42648b82c2..1e7c325d30 100755..100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -312,8 +312,6 @@ void update_texture_fetch()
// true when all initialization done.
bool idle_startup()
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
static LLTimer timeout;
static S32 timeout_count = 0;
@@ -1420,7 +1418,7 @@ bool idle_startup()
display_startup();
//reset statistics
- LLViewerStats::getInstance()->resetStats();
+ LLViewerStats::instance().resetStats();
display_startup();
//
@@ -1949,7 +1947,7 @@ bool idle_startup()
llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl;
LLSLURL start_slurl = LLStartUp::getStartSLURL();
LL_DEBUGS("AppInit") << "start slurl "<<start_slurl.asString()<<LL_ENDL;
-
+
if (((start_slurl.getType() == LLSLURL::LOCATION) && (gAgentStartLocation == "url")) ||
((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) ||
((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home")))
@@ -2296,7 +2294,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
// break;
case 2: // Teleport
// Restart the login process, starting at our home locaton
- LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
+ LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
break;
default:
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 760e38890b..760e38890b 100755..100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index f64a72a616..ec11a23eb8 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -62,8 +62,6 @@ LLColor4U MAX_WATER_COLOR(0, 48, 96, 240);
S32 LLSurface::sTextureSize = 256;
-S32 LLSurface::sTexelsUpdated = 0;
-F32 LLSurface::sTextureUpdateTime = 0.f;
// ---------------- LLSurface:: Public Members ---------------
@@ -647,7 +645,6 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent)
BOOL LLSurface::idleUpdate(F32 max_update_time)
{
- LLMemType mt_ius(LLMemType::MTYPE_IDLE_UPDATE_SURFACE);
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN))
{
return FALSE;
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 8052fb0d18..9d24bf8771 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -169,9 +169,6 @@ public:
F32 mDetailTextureScale; // Number of times to repeat detail texture across this surface
- static F32 sTextureUpdateTime;
- static S32 sTexelsUpdated;
-
protected:
void createSTexture();
void createWaterTexture();
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2c0da60b48..c812199796 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -58,6 +58,7 @@ protected:
// LLTexLayerParamAlpha
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamAlpha : public LLTexLayerParam
{
public:
@@ -65,6 +66,16 @@ public:
LLTexLayerParamAlpha( LLVOAvatar* avatar );
/*virtual*/ ~LLTexLayerParamAlpha();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
@@ -94,7 +105,7 @@ private:
LLPointer<LLImageRaw> mStaticImageRaw;
BOOL mNeedsCreateTexture;
BOOL mStaticImageInvalid;
- LLVector4a mAvgDistortionVec;
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
public:
@@ -104,7 +115,7 @@ public:
typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t;
static param_alpha_ptr_list_t sInstances;
-};
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo
{
friend class LLTexLayerParamAlpha;
@@ -128,6 +139,8 @@ private:
// LLTexLayerParamColor
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamColor : public LLTexLayerParam
{
public:
@@ -141,6 +154,17 @@ public:
LLTexLayerParamColor( LLTexLayerInterface* layer );
LLTexLayerParamColor( LLVOAvatar* avatar );
+
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
/* virtual */ ~LLTexLayerParamColor();
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
@@ -166,8 +190,8 @@ public:
protected:
virtual void onGlobalColorChanged(bool upload_bake) {}
private:
- LLVector4a mAvgDistortionVec;
-};
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
{
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 7adf5212c2..9d4f983224 100644..100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -50,6 +50,7 @@
#include "llviewertexture.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
+#include "llviewerstatsrecorder.h"
#include "llviewerassetstats.h"
#include "llworld.h"
#include "llsdutil.h"
@@ -1739,6 +1740,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
// *TODO: set the formatted image data here directly to avoid the copy
mBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size);
buffer->readAfter(channels.in(), NULL, mBuffer, data_size);
@@ -1773,6 +1775,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
mLoaded = TRUE;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ LLViewerStatsRecorder::instance().log(0.2f);
return data_size ;
}
@@ -2672,6 +2675,9 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
return false;
}
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
worker->lockWorkMutex();
// Copy header data into image object
@@ -2718,6 +2724,9 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
return false;
}
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
worker->lockWorkMutex();
res = worker->insertPacket(packet_num, data, data_size);
@@ -3329,7 +3338,7 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time)
}
//collect statistics
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32() - mTotalFetchingTime;
std::set<LLUUID> fetched_textures;
S32 size = mFetchingHistory.size();
@@ -3429,7 +3438,7 @@ void LLTextureFetchDebugger::tryToStopDebug()
{
mFetchingHistory.clear();
init();
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32(); //reset
}
}
}
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index f5072a79f1..46bdcd1dc5 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -35,6 +35,7 @@
#include "lltextureinfo.h"
#include "llapr.h"
#include "llimageworker.h"
+#include "llstat.h"
//#include "lltexturecache.h"
class LLViewerTexture;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index c60b4155a0..c60b4155a0 100755..100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 8fef2ed6d1..3f75f8da5e 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -357,6 +357,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
if (mLineEditor)
{
mLineEditor->selectAll();
+ mLineEditor->setFocus(TRUE);
}
if(mDefaultOption >= 0)
{
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 4c59fd0371..4c59fd0371 100755..100644
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index 8319752230..8319752230 100755..100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index d58ee05fb6..ffeea2f4df 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -168,7 +168,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera");
void display_update_camera()
{
LLFastTimer t(FTM_UPDATE_CAMERA);
- LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA);
// TODO: cut draw distance down if customizing avatar?
// TODO: cut draw distance on per-parcel basis?
@@ -218,7 +217,7 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window");
@@ -230,7 +229,6 @@ static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
- LLMemType mt_render(LLMemType::MTYPE_RENDER);
LLFastTimer t(FTM_RENDER);
if (gWindowResized)
@@ -581,7 +579,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!gDisconnected)
{
- LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE);
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{ //don't draw hud objects in this frame
@@ -603,7 +600,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// *TODO: merge these two methods
{
LLFastTimer t(FTM_HUD_UPDATE);
- LLMemType mt_uh(LLMemType::MTYPE_DISPLAY_UPDATE_HUD);
LLHUDManager::getInstance()->updateEffects();
LLHUDObject::updateAll();
stop_glerror();
@@ -611,7 +607,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM);
- LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM);
const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
gPipeline.createObjects(max_geom_update_time);
gPipeline.processPartitionQ();
@@ -672,8 +667,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
{
- LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
-
if (gResizeScreenTexture)
{
gResizeScreenTexture = FALSE;
@@ -732,7 +725,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//if (!for_snapshot)
{
- LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION);
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
@@ -752,7 +744,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages");
{
- LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(FTM_IMAGE_UPDATE);
{
@@ -796,7 +787,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort");
{
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT);
gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
stop_glerror();
@@ -818,7 +808,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = occlusion;
{
- LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SKY);
LLAppViewer::instance()->pingMainloopTimeout("Display:Sky");
LLFastTimer t(FTM_UPDATE_SKY);
gSky.updateSky();
@@ -907,7 +896,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
&& !gRestoreGL)
{
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM);
if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction)
{
@@ -968,7 +956,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (to_texture)
{
- LLMemType mt_rf(LLMemType::MTYPE_DISPLAY_RENDER_FLUSH);
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
gPipeline.mDeferredScreen.flush();
@@ -1035,7 +1022,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
void render_hud_attachments()
{
- LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
@@ -1225,7 +1211,6 @@ static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
void render_ui(F32 zoom_factor, int subfield)
{
- LLMemType mt_ru(LLMemType::MTYPE_DISPLAY_RENDER_UI);
LLGLState::checkStates();
glh::matrix4f saved_view = glh_get_current_modelview();
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b47a41c44c..b47a41c44c 100755..100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 5d1aa870a3..5d1aa870a3 100755..100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index dd5dae1dc1..dd5dae1dc1 100755..100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 1aa9fd8a45..f5d3341c66 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -160,6 +160,11 @@ void agent_push_backward( EKeystate s )
camera_move_backward(s);
return;
}
+ else if (gAgentAvatarp->isSitting())
+ {
+ gAgentCamera.changeCameraToThirdPerson();
+ return;
+ }
agent_push_forwardbackward(s, -1, LLAgent::DOUBLETAP_BACKWARD);
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 01a54509ef..4ec498dc33 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -341,7 +341,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver()
void LLMenuParcelObserver::changed()
{
- gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL));
+ LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
+ gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID()));
BOOL buyable = enable_buy_land(NULL);
gMenuHolder->childSetEnabled("Land Buy", buyable);
@@ -1316,22 +1317,6 @@ class LLAdvancedPrintAgentInfo : public view_listener_t
}
};
-
-
-////////////////////////////////
-// PRINT TEXTURE MEMORY STATS //
-////////////////////////////////
-
-
-class LLAdvancedPrintTextureMemoryStats : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- output_statistics(NULL);
- return true;
- }
-};
-
//////////////////
// DEBUG CLICKS //
//////////////////
@@ -3463,6 +3448,20 @@ bool enable_sitdown_self()
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
+class LLCheckPanelPeopleTab : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string panel_name = userdata.asString();
+
+ LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name);
+ if(panel && panel->isInVisibleChain())
+ {
+ return true;
+ }
+ return false;
+ }
+};
// Toggle one of "People" panel tabs in side tray.
class LLTogglePanelPeopleTab : public view_listener_t
{
@@ -3940,6 +3939,7 @@ class LLViewToggleUI : public view_listener_t
if (option == 0) // OK
{
gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
+ LLPanelStandStopFlying::getInstance()->setVisible(gViewerWindow->getUIVisibility());
}
}
};
@@ -8432,7 +8432,6 @@ void initialize_menus()
commit.add("Advanced.DumpFocusHolder", boost::bind(&handle_dump_focus) );
view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo");
view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo");
- view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats");
view_listener_t::addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks");
view_listener_t::addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks");
view_listener_t::addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews");
@@ -8551,6 +8550,7 @@ void initialize_menus()
// we don't use boost::bind directly to delay side tray construction
view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab");
+ view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab");
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index dc2ea4bd1f..be78603e2d 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -34,6 +34,7 @@
#include "llfilepicker.h"
#include "llfloaterreg.h"
#include "llbuycurrencyhtml.h"
+#include "llfloatermap.h"
#include "llfloatermodelpreview.h"
#include "llfloatersnapshot.h"
#include "llimage.h"
@@ -475,7 +476,7 @@ class LLFileEnableCloseWindow : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = NULL != LLFloater::getClosableFloaterFromFocus();
+ bool new_value = NULL != gFloaterView->getFrontmostClosableFloater();
return new_value;
}
};
@@ -484,8 +485,7 @@ class LLFileCloseWindow : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloater::closeFocusedFloater();
-
+ LLFloater::closeFrontmostFloater();
return true;
}
};
@@ -494,7 +494,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool open_children = gFloaterView->allChildrenClosed();
+ bool open_children = gFloaterView->allChildrenClosed() && !LLFloaterSnapshot::getInstance()->isInVisibleChain();
return !open_children;
}
};
@@ -505,7 +505,7 @@ class LLFileCloseAllWindows : public view_listener_t
{
bool app_quitting = false;
gFloaterView->closeAllChildren(app_quitting);
-
+ LLFloaterSnapshot::getInstance()->closeFloater(app_quitting);
return true;
}
};
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 903f4437a7..85ea543838 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3007,11 +3007,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
- LLNotification::Params params("TeleportOffered");
- params.substitutions = args;
- params.payload = payload;
- LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false);
- }
+ LLNotification::Params params("TeleportOffered");
+ params.substitutions = args;
+ params.payload = payload;
+ LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false);
+ }
}
}
@@ -3102,10 +3102,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
- // do not show a message box, because you're about to be
- // teleported.
- LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0);
- }
+ // do not show a message box, because you're about to be
+ // teleported.
+ LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0);
+ }
}
break;
@@ -4276,7 +4276,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
msg_number += 1;
if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
{
- //LL_INFOS("Messaging") << " head rot " << head_rotation << LL_ENDL;
+ //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", head_rot_chg " << head_rot_chg << LL_ENDL;
}
if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
@@ -4295,7 +4295,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
{
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", dcf = " << control_flag_change << LL_ENDL;
}
- */
+*/
duplicate_count = 0;
}
@@ -4420,7 +4420,6 @@ extern U32 gObjectBits;
void process_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
@@ -4437,7 +4436,6 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data)
void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
@@ -4454,7 +4452,6 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data
void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
@@ -4472,7 +4469,6 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (mesgsys->getReceiveCompressedSize())
{
gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
@@ -4485,7 +4481,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_
gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED);
}
-static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects");
+static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects");
void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
@@ -5629,14 +5625,14 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
bool handle_prompt_for_maturity_level_change_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
+
if (0 == option)
{
// set the preference to the maturity of the region we're calling
U8 preferredMaturity = static_cast<U8>(notification["payload"]["_region_access"].asInteger());
gSavedSettings.setU32("PreferredMaturity", static_cast<U32>(preferredMaturity));
}
-
+
return false;
}
@@ -5699,7 +5695,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
gAgent.clearTeleportRequest();
maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_AdultsOnlyContent", llsdBlock);
returnValue = true;
-
+
notifySuffix = "_NotifyAdultsOnly";
}
else if (gAgent.prefersPG() || gAgent.prefersMature())
@@ -5796,7 +5792,7 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock)
maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_PreferencesOutOfSync", llsdBlock, llsdBlock, handle_prompt_for_maturity_level_change_callback);
returnValue = true;
}
- }
+ }
if ((maturityLevelNotification == NULL) || maturityLevelNotification->isIgnored())
{
@@ -5962,8 +5958,8 @@ void process_alert_core(const std::string& message, BOOL modal)
std::string alert_name(message.substr(ALERT_PREFIX.length()));
if (!handle_special_alerts(alert_name))
{
- LLNotificationsUtil::add(alert_name);
- }
+ LLNotificationsUtil::add(alert_name);
+ }
}
else if (message.find(NOTIFY_PREFIX) == 0)
{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 444bbb2776..8bee59a107 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -875,7 +875,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
U32 retval = 0x0;
// If region is removed from the list it is also deleted.
@@ -2341,8 +2340,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
delete [] mData;
if (datap)
@@ -2384,8 +2381,6 @@ void LLViewerObject::doUpdateInventory(
U8 key,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLViewerInventoryItem* old_item = NULL;
if(TASK_INVENTORY_ITEM_KEY == key)
{
@@ -2469,8 +2464,6 @@ void LLViewerObject::saveScript(
BOOL active,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
/*
* XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the
* interaction with doUpdateInventory() called below.
@@ -2546,8 +2539,6 @@ void LLViewerObject::dirtyInventory()
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo;
info->mListener = listener;
info->mInventoryData = user_data;
@@ -2645,8 +2636,6 @@ S32 LLFilenameAndTask::sCount = 0;
// static
void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLUUID task_id;
msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id);
LLViewerObject* object = gObjectList.findObject(task_id);
@@ -2733,8 +2722,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
void LLViewerObject::loadTaskInvFile(const std::string& filename)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
llifstream ifs(filename_and_local_path);
if(ifs.good())
@@ -2858,23 +2845,6 @@ void LLViewerObject::updateInventory(
U8 key,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
- std::list<LLUUID>::iterator begin = mPendingInventoryItemsIDs.begin();
- std::list<LLUUID>::iterator end = mPendingInventoryItemsIDs.end();
-
- bool is_fetching = std::find(begin, end, item->getAssetUUID()) != end;
- bool is_fetched = getInventoryItemByAsset(item->getAssetUUID()) != NULL;
-
- if (is_fetched || is_fetching)
- {
- return;
- }
- else
- {
- mPendingInventoryItemsIDs.push_back(item->getAssetUUID());
- }
-
// This slices the object into what we're concerned about on the
// viewer. The simulator will take the permissions and transfer
// ownership.
@@ -3883,8 +3853,6 @@ std::string LLViewerObject::getMediaURL() const
void LLViewerObject::setMediaURL(const std::string& media_url)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
if (!mMedia)
{
mMedia = new LLViewerObjectMedia;
@@ -3934,8 +3902,6 @@ BOOL LLViewerObject::setMaterial(const U8 material)
void LLViewerObject::setNumTEs(const U8 num_tes)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
U32 i;
if (num_tes != getNumTEs())
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 277bd1c430..02b4f84785 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -34,7 +34,6 @@
#include "llhudicon.h"
#include "llinventory.h"
#include "llrefcount.h"
-#include "llmemtype.h"
#include "llprimitive.h"
#include "lluuid.h"
#include "llvoinventorylistener.h"
@@ -128,7 +127,6 @@ public:
typedef const child_list_t const_child_list_t;
LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE);
- MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT);
virtual void markDead(); // Mark this object as dead, and clean up its references
BOOL isDead() const {return mDead;}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index e399b45cba..88bb087742 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -230,7 +230,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
LLDataPacker* dpp,
BOOL just_created)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE);
LLMessageSystem* msg = gMessageSystem;
// ignore returned flags
@@ -283,7 +282,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
const EObjectUpdateType update_type,
bool cached, bool compressed)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE);
LLFastTimer t(FTM_PROCESS_OBJECTS);
LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal();
@@ -334,6 +332,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U64 region_handle;
mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
+
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
if (!regionp)
@@ -345,16 +344,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U8 compressed_dpbuffer[2048];
LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048);
LLDataPacker *cached_dpp = NULL;
-
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(regionp);
-#endif
+ LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance();
for (i = 0; i < num_objects; i++)
{
// timer is unused?
LLTimer update_timer;
BOOL justCreated = FALSE;
+ S32 msg_size = 0;
if (cached)
{
@@ -362,6 +359,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U32 crc;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i);
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i);
+ msg_size += sizeof(U32) * 2;
// Lookup data packer and add this id to cache miss lists if necessary.
U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@@ -377,9 +375,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
else
{
// Cache Miss.
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordCacheMissEvent(id, update_type, cache_miss_type);
- #endif
+ recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size);
continue; // no data packer, skip this object
}
@@ -422,6 +418,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
else if (update_type != OUT_FULL) // !compressed, !OUT_FULL ==> OUT_FULL_CACHED only?
{
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ msg_size += sizeof(U32);
+
getUUIDFromLocal(fullid,
local_id,
gMessageSystem->getSenderIP(),
@@ -436,6 +434,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i);
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ msg_size += sizeof(LLUUID);
+ msg_size += sizeof(U32);
// llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl;
}
objectp = findObject(fullid);
@@ -481,9 +481,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type == OUT_TERSE_IMPROVED)
{
// llinfos << "terse update for an unknown object (compressed):" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
}
@@ -495,22 +493,20 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type != OUT_FULL)
{
//llinfos << "terse update for an unknown object:" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_PCode, pcode, i);
+ msg_size += sizeof(U8);
+
}
#ifdef IGNORE_DEAD
if (mDeadObjects.find(fullid) != mDeadObjects.end())
{
mNumDeadObjectUpdates++;
//llinfos << "update for a dead object:" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
#endif
@@ -519,9 +515,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (!objectp)
{
llinfos << "createObject failure for object: " << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
justCreated = TRUE;
@@ -547,12 +541,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
bCached = true;
- #if LL_RECORD_VIEWER_STATS
LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
- LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp);
- #else
- objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
- #endif
+ recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size);
}
}
else if (cached) // Cache hit only?
@@ -568,16 +558,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
}
processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated);
}
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp);
- #endif
+ recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size);
objectp->setLastUpdateType(update_type);
objectp->setLastUpdateCached(bCached);
}
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->endObjectUpdateEvents();
-#endif
+ recorder.log(0.2f);
LLVOAvatar::cullAvatarsByPixelArea();
}
@@ -866,8 +852,6 @@ private:
void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
// Update globals
LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") );
LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") );
@@ -915,12 +899,12 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
static std::vector<LLViewerObject*> idle_list;
U32 idle_count = 0;
-
+
static LLFastTimer::DeclareTimer idle_copy("Idle Copy");
{
LLFastTimer t(idle_copy);
-
+
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
active_iter != mActiveObjects.end(); active_iter++)
{
@@ -929,9 +913,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
{
if (idle_count >= idle_list.size())
{
- idle_list.push_back( objectp );
- }
- else
+ idle_list.push_back( objectp );
+ }
+ else
{
idle_list[idle_count] = objectp;
}
@@ -948,7 +932,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count;
if (gSavedSettings.getBOOL("FreezeTime"))
- {
+ {
for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
iter != idle_end; iter++)
@@ -1179,7 +1163,6 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
@@ -1407,7 +1390,6 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (objectp->isDead())
{
return; // We don't update dead objects!
@@ -1424,10 +1406,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
mActiveObjects.push_back(objectp);
objectp->setListIndex(mActiveObjects.size()-1);
- objectp->setOnActiveList(TRUE);
- }
- else
- {
+ objectp->setOnActiveList(TRUE);
+ }
+ else
+ {
llassert(idx < mActiveObjects.size());
llassert(mActiveObjects[idx] == objectp);
@@ -1553,13 +1535,13 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{
LLFastTimer t(FTM_PIPELINE_SHIFT);
- gPipeline.shiftObjects(offset);
+ gPipeline.shiftObjects(offset);
}
{
LLFastTimer t(FTM_REGION_SHIFT);
- LLWorld::getInstance()->shiftRegions(offset);
- }
+ LLWorld::getInstance()->shiftRegions(offset);
+}
}
void LLViewerObjectList::repartitionObjects()
@@ -1886,7 +1868,6 @@ void LLViewerObjectList::resetObjectBeacons()
LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
LLUUID fullid;
fullid.generate();
@@ -1907,13 +1888,9 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
}
-static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object");
-
LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp,
const LLUUID &uuid, const U32 local_id, const LLHost &sender)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
- LLFastTimer t(FTM_CREATE_OBJECT);
LLUUID fullid;
if (uuid == LLUUID::null)
@@ -1977,7 +1954,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
#ifdef ORPHAN_SPAM
llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl;
#endif
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index a0cf2fc803..a1c12c5cd6 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -828,7 +828,6 @@ void LLViewerParcelOverlay::updateGL()
void LLViewerParcelOverlay::idleUpdate(bool force_update)
{
- LLMemType mt_iup(LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY);
if (gGLManager.mIsDisabled)
{
return;
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 345023dbfa..6bd9f66b9c 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -79,7 +79,6 @@ LLViewerPart::LLViewerPart() :
mVPCallback(NULL),
mImagep(NULL)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartSourcep = NULL;
++LLViewerPartSim::sParticleCount2 ;
@@ -87,7 +86,6 @@ LLViewerPart::LLViewerPart() :
LLViewerPart::~LLViewerPart()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartSourcep = NULL;
--LLViewerPartSim::sParticleCount2 ;
@@ -95,7 +93,6 @@ LLViewerPart::~LLViewerPart()
void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartID = LLViewerPart::sNextPartID;
LLViewerPart::sNextPartID++;
mFlags = 0x00f;
@@ -120,7 +117,6 @@ void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *
LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 box_side, bool hud)
: mHud(hud)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mVOPartGroupp = NULL;
mUniformParticles = TRUE;
@@ -177,7 +173,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 bo
LLViewerPartGroup::~LLViewerPartGroup()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
cleanup();
S32 count = (S32) mParticles.size();
@@ -192,7 +187,6 @@ LLViewerPartGroup::~LLViewerPartGroup()
void LLViewerPartGroup::cleanup()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (mVOPartGroupp)
{
if (!mVOPartGroupp->isDead())
@@ -205,7 +199,6 @@ void LLViewerPartGroup::cleanup()
BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if ((pos.mV[VX] < mMinObjPos.mV[VX])
|| (pos.mV[VY] < mMinObjPos.mV[VY])
|| (pos.mV[VZ] < mMinObjPos.mV[VZ]))
@@ -233,8 +226,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
if (part->mFlags & LLPartData::LL_PART_HUD && !mHud)
{
return FALSE;
@@ -261,7 +252,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
void LLViewerPartGroup::updateParticles(const F32 lastdt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 dt;
LLVector3 gravity(0.f, 0.f, GRAVITY);
@@ -429,7 +419,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
void LLViewerPartGroup::shift(const LLVector3 &offset)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mCenterAgent += offset;
mMinObjPos += offset;
mMaxObjPos += offset;
@@ -442,8 +431,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset)
void LLViewerPartGroup::removeParticlesByID(const U32 source_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
for (S32 i = 0; i < (S32)mParticles.size(); i++)
{
if(mParticles[i]->mPartSourcep->getID() == source_id)
@@ -475,7 +462,6 @@ void LLViewerPartSim::checkParticleCount(U32 size)
LLViewerPartSim::LLViewerPartSim()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT);
static U32 id_seed = 0;
mID = ++id_seed;
@@ -484,7 +470,6 @@ LLViewerPartSim::LLViewerPartSim()
void LLViewerPartSim::destroyClass()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
S32 i;
S32 count;
@@ -500,9 +485,9 @@ void LLViewerPartSim::destroyClass()
mViewerPartSources.clear();
}
+//static
BOOL LLViewerPartSim::shouldAddPart()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
{
@@ -525,7 +510,6 @@ BOOL LLViewerPartSim::shouldAddPart()
void LLViewerPartSim::addPart(LLViewerPart* part)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (sParticleCount < MAX_PART_COUNT)
{
put(part);
@@ -541,7 +525,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part)
LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million
LLViewerPartGroup *return_group = NULL ;
if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite())
@@ -599,7 +582,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
//find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses
//pos_agent
LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud);
@@ -632,8 +614,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles");
void LLViewerPartSim::updateSimulation()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
static LLFrameTimer update_timer;
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
@@ -800,7 +780,6 @@ void LLViewerPartSim::updatePartBurstRate()
void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!sourcep)
{
llwarns << "Null part source!" << llendl;
@@ -817,7 +796,6 @@ void LLViewerPartSim::removeLastCreatedSource()
void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (group_list_t::iterator i = mViewerPartGroups.begin(); i != mViewerPartGroups.end(); )
{
group_list_t::iterator iter = i++;
@@ -832,7 +810,6 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
void LLViewerPartSim::clearParticlesByID(const U32 system_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g)
{
(*g)->removeParticlesByID(system_id);
@@ -850,7 +827,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id)
void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter)
{
if ((*iter)->getOwnerUUID() == task_id)
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index c9959c63ec..c91fcf0691 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -142,7 +142,7 @@ public:
void cleanupRegion(LLViewerRegion *regionp);
- BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
+ static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
F32 maxRate() // Return maximum particle generation rate
{
if (sParticleCount >= MAX_PART_COUNT)
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 4af92e79ff..b311f659fb 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -90,7 +90,6 @@ void LLViewerPartSource::setStart()
LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) :
LLViewerPartSource(LL_PART_SOURCE_SCRIPT)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
llassert(source_objp);
mSourceObjectp = source_objp;
mPosAgent = mSourceObjectp->getPositionAgent();
@@ -102,7 +101,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
void LLViewerPartSourceScript::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
@@ -113,7 +111,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
if( mIsSuspended )
return;
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 old_update_time = mLastUpdateTime;
mLastUpdateTime += dt;
@@ -394,7 +391,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
// static
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
if (LLPartSysData::isNullPS(block_num))
@@ -436,7 +432,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
@@ -470,8 +465,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
/* static */
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
new_pssp->mPartSysData = particle_parameters;
@@ -487,13 +480,11 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer
void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mImagep = imagep;
}
void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mTargetObjectp = objp;
}
@@ -509,7 +500,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) :
void LLViewerPartSourceSpiral::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
}
@@ -517,7 +507,6 @@ void LLViewerPartSourceSpiral::setDead()
void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLVector3 center_pos;
@@ -542,7 +531,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceSpiral::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
@@ -588,7 +576,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
@@ -612,7 +599,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam()
void LLViewerPartSourceBeam::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
@@ -626,7 +612,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color)
void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep;
@@ -671,7 +656,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceBeam::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
const F32 RATE = 0.025f;
mLastUpdateTime += dt;
@@ -743,13 +727,11 @@ void LLViewerPartSourceBeam::update(const F32 dt)
void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mTargetObjectp = objp;
}
@@ -764,7 +746,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) :
void LLViewerPartSourceChat::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
}
@@ -772,7 +753,6 @@ void LLViewerPartSourceChat::setDead()
void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLVector3 center_pos;
@@ -797,7 +777,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceChat::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
@@ -853,7 +832,6 @@ void LLViewerPartSourceChat::update(const F32 dt)
void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 6c8a827ba3..0316f79973 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -59,8 +59,6 @@
#include "indra_constants.h"
#include "llinitparam.h"
-//#include "linden_common.h"
-//#include "llpreprocessor.h"
#include "llallocator.h"
#include "llapp.h"
#include "llcriticaldamp.h"
@@ -77,10 +75,8 @@
#include "llprocessor.h"
#include "llrefcount.h"
#include "llsafehandle.h"
-//#include "llsecondlifeurls.h"
#include "llsd.h"
#include "llsingleton.h"
-#include "llstat.h"
#include "llstl.h"
#include "llstrider.h"
#include "llstring.h"
@@ -88,11 +84,8 @@
#include "llthread.h"
#include "lltimer.h"
#include "lluuidhashmap.h"
-//#include "processor.h"
#include "stdenums.h"
#include "stdtypes.h"
-//#include "string_table.h"
-//#include "timer.h"
#include "timing.h"
#include "u64.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index effa368b7a..c015049f6c 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -720,7 +720,6 @@ void LLViewerRegion::dirtyHeights()
BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
{
- LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION);
// did_update returns TRUE if we did at least one significant update
BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time);
@@ -1343,11 +1342,8 @@ void LLViewerRegion::requestCacheMisses()
mCacheDirty = TRUE ;
// llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(this);
- LLViewerStatsRecorder::instance()->recordRequestCacheMissesEvent(full_count + crc_count);
- LLViewerStatsRecorder::instance()->endObjectUpdateEvents();
- #endif
+ LLViewerStatsRecorder::instance().requestCacheMissesEvent(full_count + crc_count);
+ LLViewerStatsRecorder::instance().log(0.2f);
}
void LLViewerRegion::dumpCache()
@@ -1548,7 +1544,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("LandResources");
capabilityNames.append("MapLayer");
capabilityNames.append("MapLayerGod");
- capabilityNames.append("MeshUploadFlag");
+ capabilityNames.append("MeshUploadFlag");
capabilityNames.append("NavMeshGenerationStatus");
capabilityNames.append("NewFileAgentInventory");
capabilityNames.append("ObjectNavMeshProperties");
@@ -1587,7 +1583,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");
-
+
// Please add new capabilities alphabetically to reduce
// merge conflicts.
}
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d1c6b7ea79..0dce0d0682 100755..100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -290,19 +290,19 @@ LLViewerStats::~LLViewerStats()
void LLViewerStats::resetStats()
{
- LLViewerStats::getInstance()->mKBitStat.reset();
- LLViewerStats::getInstance()->mLayersKBitStat.reset();
- LLViewerStats::getInstance()->mObjectKBitStat.reset();
- LLViewerStats::getInstance()->mTextureKBitStat.reset();
- LLViewerStats::getInstance()->mVFSPendingOperations.reset();
- LLViewerStats::getInstance()->mAssetKBitStat.reset();
- LLViewerStats::getInstance()->mPacketsInStat.reset();
- LLViewerStats::getInstance()->mPacketsLostStat.reset();
- LLViewerStats::getInstance()->mPacketsOutStat.reset();
- LLViewerStats::getInstance()->mFPSStat.reset();
- LLViewerStats::getInstance()->mTexturePacketsStat.reset();
-
- LLViewerStats::getInstance()->mAgentPositionSnaps.reset();
+ LLViewerStats& stats = LLViewerStats::instance();
+ stats.mKBitStat.reset();
+ stats.mLayersKBitStat.reset();
+ stats.mObjectKBitStat.reset();
+ stats.mTextureKBitStat.reset();
+ stats.mVFSPendingOperations.reset();
+ stats.mAssetKBitStat.reset();
+ stats.mPacketsInStat.reset();
+ stats.mPacketsLostStat.reset();
+ stats.mPacketsOutStat.reset();
+ stats.mFPSStat.reset();
+ stats.mTexturePacketsStat.reset();
+ stats.mAgentPositionSnaps.reset();
}
@@ -327,55 +327,55 @@ void LLViewerStats::updateFrameStats(const F64 time_diff)
{
if (mPacketsLostPercentStat.getCurrent() > 5.0)
{
- incStat(LLViewerStats::ST_LOSS_05_SECONDS, time_diff);
+ incStat(ST_LOSS_05_SECONDS, time_diff);
}
if (mSimFPS.getCurrent() < 20.f && mSimFPS.getCurrent() > 0.f)
{
- incStat(LLViewerStats::ST_SIM_FPS_20_SECONDS, time_diff);
+ incStat(ST_SIM_FPS_20_SECONDS, time_diff);
}
if (mSimPhysicsFPS.getCurrent() < 20.f && mSimPhysicsFPS.getCurrent() > 0.f)
{
- incStat(LLViewerStats::ST_PHYS_FPS_20_SECONDS, time_diff);
+ incStat(ST_PHYS_FPS_20_SECONDS, time_diff);
}
if (time_diff >= 0.5)
{
- incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff);
+ incStat(ST_FPS_2_SECONDS, time_diff);
}
if (time_diff >= 0.125)
{
- incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff);
+ incStat(ST_FPS_8_SECONDS, time_diff);
}
if (time_diff >= 0.1)
{
- incStat(LLViewerStats::ST_FPS_10_SECONDS, time_diff);
+ incStat(ST_FPS_10_SECONDS, time_diff);
}
if (gFrameCount && mLastTimeDiff > 0.0)
{
// new "stutter" meter
- setStat(LLViewerStats::ST_FPS_DROP_50_RATIO,
- (getStat(LLViewerStats::ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) +
+ setStat(ST_FPS_DROP_50_RATIO,
+ (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) +
(time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount);
// old stats that were never really used
- setStat(LLViewerStats::ST_FRAMETIME_JITTER,
- (getStat(LLViewerStats::ST_FRAMETIME_JITTER) * (gFrameCount - 1) +
+ setStat(ST_FRAMETIME_JITTER,
+ (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) +
fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount);
F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
- setStat(LLViewerStats::ST_FRAMETIME_SLEW,
- (getStat(LLViewerStats::ST_FRAMETIME_SLEW) * (gFrameCount - 1) +
+ setStat(ST_FRAMETIME_SLEW,
+ (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) +
fabs(average_frametime - time_diff) / average_frametime) / gFrameCount);
F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth;
- setStat(LLViewerStats::ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f);
+ setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f);
- setStat(LLViewerStats::ST_MAX_BANDWIDTH, max_bandwidth / 1024.f);
+ setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f);
}
@@ -403,155 +403,8 @@ void LLViewerStats::addToMessage(LLSD &body) const
<< "; Count = " << mAgentPositionSnaps.getCount() << llendl;
}
-// static
-// const std::string LLViewerStats::statTypeToText(EStatType type)
-// {
-// if (type >= 0 && type < ST_COUNT)
-// {
-// return STAT_INFO[type].mName;
-// }
-// else
-// {
-// return "Unknown statistic";
-// }
-// }
-
// *NOTE:Mani The following methods used to exist in viewer.cpp
// Moving them here, but not merging them into LLViewerStats yet.
-void reset_statistics()
-{
- if (LLSurface::sTextureUpdateTime)
- {
- LLSurface::sTexelsUpdated = 0;
- LLSurface::sTextureUpdateTime = 0.f;
- }
-}
-
-
-void output_statistics(void*)
-{
- llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl;
- llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl;
- llinfos << "Num images: " << gTextureList.getNumImages() << llendl;
- llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl;
- llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl;
- llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl;
- llinfos << "Formatted usage: " << LLImageFormatted::sGlobalFormattedMemory << llendl;
- llinfos << "Zombie Viewer Objects: " << LLViewerObject::getNumZombieObjects() << llendl;
- llinfos << "Number of lights: " << gPipeline.getLightCount() << llendl;
-
- llinfos << "Memory Usage:" << llendl;
- llinfos << "--------------------------------" << llendl;
- llinfos << "Pipeline:" << llendl;
- llinfos << llendl;
-
-#if LL_SMARTHEAP
- llinfos << "--------------------------------" << llendl;
- {
- llinfos << "sizeof(LLVOVolume) = " << sizeof(LLVOVolume) << llendl;
-
- U32 total_pool_size = 0;
- U32 total_used_size = 0;
- MEM_POOL_INFO pool_info;
- MEM_POOL_STATUS pool_status;
- U32 pool_num = 0;
- for(pool_status = MemPoolFirst( &pool_info, 1 );
- pool_status != MEM_POOL_END;
- pool_status = MemPoolNext( &pool_info, 1 ) )
- {
- llinfos << "Pool #" << pool_num << llendl;
- if( MEM_POOL_OK != pool_status )
- {
- llwarns << "Pool not ok" << llendl;
- continue;
- }
-
- llinfos << "Pool blockSizeFS " << pool_info.blockSizeFS
- << " pageSize " << pool_info.pageSize
- << llendl;
-
- U32 pool_count = MemPoolCount(pool_info.pool);
- llinfos << "Blocks " << pool_count << llendl;
-
- U32 pool_size = MemPoolSize( pool_info.pool );
- if( pool_size == MEM_ERROR_RET )
- {
- llinfos << "MemPoolSize() failed (" << pool_num << ")" << llendl;
- }
- else
- {
- llinfos << "MemPool Size " << pool_size / 1024 << "K" << llendl;
- }
-
- total_pool_size += pool_size;
-
- if( !MemPoolLock( pool_info.pool ) )
- {
- llinfos << "MemPoolLock failed (" << pool_num << ") " << llendl;
- continue;
- }
-
- U32 used_size = 0;
- MEM_POOL_ENTRY entry;
- entry.entry = NULL;
- while( MemPoolWalk( pool_info.pool, &entry ) == MEM_POOL_OK )
- {
- if( entry.isInUse )
- {
- used_size += entry.size;
- }
- }
-
- MemPoolUnlock( pool_info.pool );
-
- llinfos << "MemPool Used " << used_size/1024 << "K" << llendl;
- total_used_size += used_size;
- pool_num++;
- }
-
- llinfos << "Total Pool Size " << total_pool_size/1024 << "K" << llendl;
- llinfos << "Total Used Size " << total_used_size/1024 << "K" << llendl;
-
- }
-#endif
-
- llinfos << "--------------------------------" << llendl;
- llinfos << "Avatar Memory (partly overlaps with above stats):" << llendl;
- LLTexLayerStaticImageList::getInstance()->dumpByteCount();
- LLVOAvatarSelf::dumpScratchTextureByteCount();
- LLTexLayerSetBuffer::dumpTotalByteCount();
- LLVOAvatarSelf::dumpTotalLocalTextureByteCount();
- LLTexLayerParamAlpha::dumpCacheByteCount();
- LLVOAvatar::dumpBakedStatus();
-
- llinfos << llendl;
-
- llinfos << "Object counts:" << llendl;
- S32 i;
- S32 obj_counts[256];
-// S32 app_angles[256];
- for (i = 0; i < 256; i++)
- {
- obj_counts[i] = 0;
- }
- for (i = 0; i < gObjectList.getNumObjects(); i++)
- {
- LLViewerObject *objectp = gObjectList.getObject(i);
- if (objectp)
- {
- obj_counts[objectp->getPCode()]++;
- }
- }
- for (i = 0; i < 256; i++)
- {
- if (obj_counts[i])
- {
- llinfos << LLPrimitive::pCodeToString(i) << ":" << obj_counts[i] << llendl;
- }
- }
-}
-
-
U32 gTotalLandIn = 0, gTotalLandOut = 0;
U32 gTotalWaterIn = 0, gTotalWaterOut = 0;
@@ -569,20 +422,15 @@ U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY]
extern U32 gVisCompared;
extern U32 gVisTested;
-std::map<S32,LLFrameTimer> gDebugTimers;
-std::map<S32,std::string> gDebugTimerLabel;
+LLFrameTimer gTextureTimer;
-void init_statistics()
-{
- // Label debug timers
- gDebugTimerLabel[0] = "Texture";
-}
-
-void update_statistics(U32 frame_count)
+void update_statistics()
{
gTotalWorldBytes += gVLManager.getTotalBytes();
gTotalObjectBytes += gObjectBits / 8;
+ LLViewerStats& stats = LLViewerStats::instance();
+
// make sure we have a valid time delta for this frame
if (gFrameIntervalSeconds > 0.f)
{
@@ -599,51 +447,47 @@ void update_statistics(U32 frame_count)
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds);
}
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
-#if 0 // 1.9.2
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_ENVIRONMENT, (F64)gSavedSettings.getBOOL("VertexShaderLevelEnvironment"));
-#endif
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame"));
+ stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
+ stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
+ stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
+ stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
+
+ stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame"));
F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle");
F64 network_secs = gDebugView->mFastTimerView->getTime("Network");
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_NETWORK_SECS, network_secs);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry"));
+ stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs);
+ stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs);
+ stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images"));
+ stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State"));
+ stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry"));
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost());
if (cdp)
{
- LLViewerStats::getInstance()->mSimPingStat.addValue(cdp->getPingDelay());
+ stats.mSimPingStat.addValue(cdp->getPingDelay());
gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1);
gSimPingCount++;
}
else
{
- LLViewerStats::getInstance()->mSimPingStat.addValue(10000);
+ stats.mSimPingStat.addValue(10000);
}
- LLViewerStats::getInstance()->mFPSStat.addValue(1);
+ stats.mFPSStat.addValue(1);
F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
- LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f);
- LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f);
- LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
- LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
+ stats.mLayersKBitStat.addValue(layer_bits/1024.f);
+ stats.mObjectKBitStat.addValue(gObjectBits/1024.f);
+ stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
+ stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
{
- gDebugTimers[0].pause();
+ gTextureTimer.pause();
}
else
{
- gDebugTimers[0].unpause();
+ gTextureTimer.unpause();
}
{
@@ -655,7 +499,7 @@ void update_statistics(U32 frame_count)
visible_avatar_frames = 1.f;
avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames;
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars);
+ stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars);
}
LLWorld::getInstance()->updateNetStats();
LLWorld::getInstance()->requestCacheMisses();
@@ -671,15 +515,14 @@ void update_statistics(U32 frame_count)
static LLFrameTimer texture_stats_timer;
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
{
- LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f);
- LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets);
+ stats.mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f);
+ stats.mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets);
gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8;
LLViewerTextureList::sTextureBits = 0;
LLViewerTextureList::sTexturePackets = 0;
texture_stats_timer.reset();
}
}
-
}
class ViewerStatsResponder : public LLHTTPClient::Responder
@@ -857,10 +700,7 @@ void send_stats()
S32 window_height = gViewerWindow->getWindowHeightRaw();
S32 window_size = (window_width * window_height) / 1024;
misc["string_1"] = llformat("%d", window_size);
- if (gDebugTimers.find(0) != gDebugTimers.end() && gFrameTimeSeconds > 0)
- {
- misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gDebugTimers[0].getElapsedTimeF32(), gFrameTimeSeconds);
- }
+ misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds);
// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 554e4d647e..e02a4ccdc7 100755..100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -33,92 +33,90 @@
class LLViewerStats : public LLSingleton<LLViewerStats>
{
public:
- LLStat mKBitStat;
- LLStat mLayersKBitStat;
- LLStat mObjectKBitStat;
- LLStat mAssetKBitStat;
- LLStat mTextureKBitStat;
- LLStat mVFSPendingOperations;
- LLStat mObjectsDrawnStat;
- LLStat mObjectsCulledStat;
- LLStat mObjectsTestedStat;
- LLStat mObjectsComparedStat;
- LLStat mObjectsOccludedStat;
- LLStat mFPSStat;
- LLStat mPacketsInStat;
- LLStat mPacketsLostStat;
- LLStat mPacketsOutStat;
- LLStat mPacketsLostPercentStat;
- LLStat mTexturePacketsStat;
- LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection)
- LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection)
- LLStat mTrianglesDrawnStat;
+ LLStat mKBitStat,
+ mLayersKBitStat,
+ mObjectKBitStat,
+ mAssetKBitStat,
+ mTextureKBitStat,
+ mVFSPendingOperations,
+ mObjectsDrawnStat,
+ mObjectsCulledStat,
+ mObjectsTestedStat,
+ mObjectsComparedStat,
+ mObjectsOccludedStat,
+ mFPSStat,
+ mPacketsInStat,
+ mPacketsLostStat,
+ mPacketsOutStat,
+ mPacketsLostPercentStat,
+ mTexturePacketsStat,
+ mActualInKBitStat, // From the packet ring (when faking a bad connection)
+ mActualOutKBitStat, // From the packet ring (when faking a bad connection)
+ mTrianglesDrawnStat;
// Simulator stats
- LLStat mSimTimeDilation;
-
- LLStat mSimFPS;
- LLStat mSimPhysicsFPS;
- LLStat mSimAgentUPS;
- LLStat mSimScriptEPS;
-
- LLStat mSimFrameMsec;
- LLStat mSimNetMsec;
- LLStat mSimSimOtherMsec;
- LLStat mSimSimPhysicsMsec;
-
- LLStat mSimSimPhysicsStepMsec;
- LLStat mSimSimPhysicsShapeUpdateMsec;
- LLStat mSimSimPhysicsOtherMsec;
-
- LLStat mSimSimAIStepMsec;
- LLStat mSimSimSkippedSilhouetteSteps;
- LLStat mSimSimPctSteppedCharacters;
-
- LLStat mSimAgentMsec;
- LLStat mSimImagesMsec;
- LLStat mSimScriptMsec;
- LLStat mSimSpareMsec;
- LLStat mSimSleepMsec;
- LLStat mSimPumpIOMsec;
-
- LLStat mSimMainAgents;
- LLStat mSimChildAgents;
- LLStat mSimObjects;
- LLStat mSimActiveObjects;
- LLStat mSimActiveScripts;
- LLStat mSimPctScriptsRun;
-
- LLStat mSimInPPS;
- LLStat mSimOutPPS;
- LLStat mSimPendingDownloads;
- LLStat mSimPendingUploads;
- LLStat mSimPendingLocalUploads;
- LLStat mSimTotalUnackedBytes;
-
- LLStat mPhysicsPinnedTasks;
- LLStat mPhysicsLODTasks;
- LLStat mPhysicsMemoryAllocated;
-
- LLStat mSimPingStat;
-
- LLStat mNumImagesStat;
- LLStat mNumRawImagesStat;
- LLStat mGLTexMemStat;
- LLStat mGLBoundMemStat;
- LLStat mRawMemStat;
- LLStat mFormattedMemStat;
-
- LLStat mNumObjectsStat;
- LLStat mNumActiveObjectsStat;
- LLStat mNumNewObjectsStat;
- LLStat mNumSizeCulledStat;
- LLStat mNumVisCulledStat;
+ LLStat mSimTimeDilation,
+
+ mSimFPS,
+ mSimPhysicsFPS,
+ mSimAgentUPS,
+ mSimScriptEPS,
+
+ mSimFrameMsec,
+ mSimNetMsec,
+ mSimSimOtherMsec,
+ mSimSimPhysicsMsec,
+
+ mSimSimPhysicsStepMsec,
+ mSimSimPhysicsShapeUpdateMsec,
+ mSimSimPhysicsOtherMsec,
+ mSimSimAIStepMsec,
+ mSimSimSkippedSilhouetteSteps,
+ mSimSimPctSteppedCharacters,
+
+ mSimAgentMsec,
+ mSimImagesMsec,
+ mSimScriptMsec,
+ mSimSpareMsec,
+ mSimSleepMsec,
+ mSimPumpIOMsec,
+
+ mSimMainAgents,
+ mSimChildAgents,
+ mSimObjects,
+ mSimActiveObjects,
+ mSimActiveScripts,
+ mSimPctScriptsRun,
+
+ mSimInPPS,
+ mSimOutPPS,
+ mSimPendingDownloads,
+ mSimPendingUploads,
+ mSimPendingLocalUploads,
+ mSimTotalUnackedBytes,
+
+ mPhysicsPinnedTasks,
+ mPhysicsLODTasks,
+ mPhysicsMemoryAllocated,
+
+ mSimPingStat,
+
+ mNumImagesStat,
+ mNumRawImagesStat,
+ mGLTexMemStat,
+ mGLBoundMemStat,
+ mRawMemStat,
+ mFormattedMemStat,
+
+ mNumObjectsStat,
+ mNumActiveObjectsStat,
+ mNumNewObjectsStat,
+ mNumSizeCulledStat,
+ mNumVisCulledStat;
void resetStats();
public:
- // If you change this, please also add a corresponding text label
- // in statTypeToText in llviewerstats.cpp
+ // If you change this, please also add a corresponding text label in llviewerstats.cpp
enum EStatType
{
ST_VERSION = 0,
@@ -183,7 +181,6 @@ public:
ST_COUNT = 58
};
-
LLViewerStats();
~LLViewerStats();
@@ -310,14 +307,10 @@ private:
static const F32 SEND_STATS_PERIOD = 300.0f;
// The following are from (older?) statistics code found in appviewer.
-void init_statistics();
-void reset_statistics();
-void output_statistics(void*);
-void update_statistics(U32 frame_count);
+void update_statistics();
void send_stats();
-extern std::map<S32,LLFrameTimer> gDebugTimers;
-extern std::map<S32,std::string> gDebugTimerLabel;
+extern LLFrameTimer gTextureTimer;
extern U32 gTotalTextureBytes;
extern U32 gTotalObjectBytes;
extern U32 gTotalTextureBytesPerBoostLevel[] ;
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index e9d21b4848..91e485d01b 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerstatsrecorder.h"
-#if LL_RECORD_VIEWER_STATS
#include "llfile.h"
#include "llviewerregion.h"
@@ -45,9 +44,8 @@ LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL;
LLViewerStatsRecorder::LLViewerStatsRecorder() :
mObjectCacheFile(NULL),
mTimer(),
- mRegionp(NULL),
- mStartTime(0.f),
- mProcessingTime(0.f)
+ mStartTime(0.0),
+ mLastSnapshotTime(0.0)
{
if (NULL != sInstance)
{
@@ -61,112 +59,77 @@ LLViewerStatsRecorder::~LLViewerStatsRecorder()
{
if (mObjectCacheFile != NULL)
{
+ // last chance snapshot
+ writeToLog(0.f);
LLFile::close(mObjectCacheFile);
mObjectCacheFile = NULL;
}
}
-// static
-void LLViewerStatsRecorder::initClass()
-{
- sInstance = new LLViewerStatsRecorder();
-}
-
-// static
-void LLViewerStatsRecorder::cleanupClass()
-{
- delete sInstance;
- sInstance = NULL;
-}
-
-
-void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp)
-{
- if (mObjectCacheFile == NULL)
- {
- mStartTime = LLTimer::getTotalTime();
- mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb");
- if (mObjectCacheFile)
- { // Write column headers
- std::ostringstream data_msg;
- data_msg << "EventTime, "
- << "ProcessingTime, "
- << "CacheHits, "
- << "CacheFullMisses, "
- << "CacheCrcMisses, "
- << "FullUpdates, "
- << "TerseUpdates, "
- << "CacheMissRequests, "
- << "CacheMissResponses, "
- << "CacheUpdateDupes, "
- << "CacheUpdateChanges, "
- << "CacheUpdateAdds, "
- << "CacheUpdateReplacements, "
- << "UpdateFailures"
- << "\n";
-
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
- }
- }
-}
-
-void LLViewerStatsRecorder::beginObjectUpdateEvents(LLViewerRegion *regionp)
-{
- initStatsRecorder(regionp);
- mRegionp = regionp;
- mProcessingTime = LLTimer::getTotalTime();
- clearStats();
-}
-
void LLViewerStatsRecorder::clearStats()
{
mObjectCacheHitCount = 0;
+ mObjectCacheHitSize = 0;
mObjectCacheMissFullCount = 0;
+ mObjectCacheMissFullSize = 0;
mObjectCacheMissCrcCount = 0;
+ mObjectCacheMissCrcSize = 0;
mObjectFullUpdates = 0;
+ mObjectFullUpdatesSize = 0;
mObjectTerseUpdates = 0;
+ mObjectTerseUpdatesSize = 0;
mObjectCacheMissRequests = 0;
mObjectCacheMissResponses = 0;
+ mObjectCacheMissResponsesSize = 0;
mObjectCacheUpdateDupes = 0;
mObjectCacheUpdateChanges = 0;
mObjectCacheUpdateAdds = 0;
mObjectCacheUpdateReplacements = 0;
mObjectUpdateFailures = 0;
+ mObjectUpdateFailuresSize = 0;
+ mTextureFetchSize = 0;
}
-void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type)
+void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size)
{
mObjectUpdateFailures++;
+ mObjectUpdateFailuresSize += msg_size;
}
-void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type)
+void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size)
{
if (LLViewerRegion::CACHE_MISS_TYPE_FULL == cache_miss_type)
{
mObjectCacheMissFullCount++;
+ mObjectCacheMissFullSize += msg_size;
}
else
{
mObjectCacheMissCrcCount++;
+ mObjectCacheMissCrcSize += msg_size;
}
}
-void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp)
+void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size)
{
switch (update_type)
{
case OUT_FULL:
mObjectFullUpdates++;
+ mObjectFullUpdatesSize += msg_size;
break;
case OUT_TERSE_IMPROVED:
mObjectTerseUpdates++;
+ mObjectTerseUpdatesSize += msg_size;
break;
case OUT_FULL_COMPRESSED:
mObjectCacheMissResponses++;
+ mObjectCacheMissResponsesSize += msg_size;
break;
case OUT_FULL_CACHED:
mObjectCacheHitCount++;
+ mObjectCacheHitSize += msg_size;
break;
default:
llwarns << "Unknown update_type" << llendl;
@@ -174,7 +137,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU
};
}
-void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp)
+void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size)
{
switch (update_result)
{
@@ -201,9 +164,15 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count)
mObjectCacheMissRequests += count;
}
-void LLViewerStatsRecorder::endObjectUpdateEvents()
+void LLViewerStatsRecorder::writeToLog( F32 interval )
{
- llinfos << "ILX: "
+ F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime;
+ S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
+
+ if ( delta_time < interval || total_objects == 0) return;
+
+ mLastSnapshotTime = LLTimer::getTotalSeconds();
+ lldebugs << "ILX: "
<< mObjectCacheHitCount << " hits, "
<< mObjectCacheMissFullCount << " full misses, "
<< mObjectCacheMissCrcCount << " crc misses, "
@@ -218,41 +187,81 @@ void LLViewerStatsRecorder::endObjectUpdateEvents()
<< mObjectUpdateFailures << " update failures"
<< llendl;
- S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
- if (mObjectCacheFile != NULL &&
- total_objects > 0)
+ if (mObjectCacheFile == NULL)
{
- std::ostringstream data_msg;
- F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0);
-
- data_msg << getTimeSinceStart()
- << ", " << processing32
- << ", " << mObjectCacheHitCount
- << ", " << mObjectCacheMissFullCount
- << ", " << mObjectCacheMissCrcCount
- << ", " << mObjectFullUpdates
- << ", " << mObjectTerseUpdates
- << ", " << mObjectCacheMissRequests
- << ", " << mObjectCacheMissResponses
- << ", " << mObjectCacheUpdateDupes
- << ", " << mObjectCacheUpdateChanges
- << ", " << mObjectCacheUpdateAdds
- << ", " << mObjectCacheUpdateReplacements
- << ", " << mObjectUpdateFailures
- << "\n";
+ mStartTime = LLTimer::getTotalSeconds();
+ mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb");
+ if (mObjectCacheFile)
+ { // Write column headers
+ std::ostringstream data_msg;
+ data_msg << "EventTime(ms)\t"
+ << "Cache Hits\t"
+ << "Cache Full Misses\t"
+ << "Cache Crc Misses\t"
+ << "Full Updates\t"
+ << "Terse Updates\t"
+ << "Cache Miss Requests\t"
+ << "Cache Miss Responses\t"
+ << "Cache Update Dupes\t"
+ << "Cache Update Changes\t"
+ << "Cache Update Adds\t"
+ << "Cache Update Replacements\t"
+ << "Update Failures\t"
+ << "Cache Hits bps\t"
+ << "Cache Full Misses bps\t"
+ << "Cache Crc Misses bps\t"
+ << "Full Updates bps\t"
+ << "Terse Updates bps\t"
+ << "Cache Miss Responses bps\t"
+ << "Texture Fetch bps\t"
+ << "\n";
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ }
+ else
+ {
+ llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl;
+ return;
+ }
}
+ std::ostringstream data_msg;
+
+ data_msg << getTimeSinceStart()
+ << "\t " << mObjectCacheHitCount
+ << "\t" << mObjectCacheMissFullCount
+ << "\t" << mObjectCacheMissCrcCount
+ << "\t" << mObjectFullUpdates
+ << "\t" << mObjectTerseUpdates
+ << "\t" << mObjectCacheMissRequests
+ << "\t" << mObjectCacheMissResponses
+ << "\t" << mObjectCacheUpdateDupes
+ << "\t" << mObjectCacheUpdateChanges
+ << "\t" << mObjectCacheUpdateAdds
+ << "\t" << mObjectCacheUpdateReplacements
+ << "\t" << mObjectUpdateFailures
+ << "\t" << (mObjectCacheHitSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissFullSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissCrcSize * 8 / delta_time)
+ << "\t" << (mObjectFullUpdatesSize * 8 / delta_time)
+ << "\t" << (mObjectTerseUpdatesSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time)
+ << "\t" << (mTextureFetchSize * 8 / delta_time)
+ << "\n";
+
+ fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
clearStats();
}
F32 LLViewerStatsRecorder::getTimeSinceStart()
{
- return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0);
+ return (F32) (LLTimer::getTotalSeconds() - mStartTime);
}
-#endif
+void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size )
+{
+ mTextureFetchSize += msg_size;
+}
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index 612ac380f7..ce6dd63ec5 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -32,66 +32,114 @@
// for analysis.
// This is normally 0. Set to 1 to enable viewer stats recording
-#define LL_RECORD_VIEWER_STATS 0
+#define LL_RECORD_VIEWER_STATS 1
-#if LL_RECORD_VIEWER_STATS
#include "llframetimer.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
class LLMutex;
-class LLViewerRegion;
class LLViewerObject;
-class LLViewerStatsRecorder
+class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
{
public:
+ LOG_CLASS(LLViewerStatsRecorder);
LLViewerStatsRecorder();
~LLViewerStatsRecorder();
- static void initClass();
- static void cleanupClass();
- static LLViewerStatsRecorder* instance() {return sInstance; }
+ void objectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordObjectUpdateFailure(local_id, update_type, msg_size);
+#endif
+ }
- void initStatsRecorder(LLViewerRegion *regionp);
+ void cacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordCacheMissEvent(local_id, update_type, cache_miss_type, msg_size);
+#endif
+ }
- void beginObjectUpdateEvents(LLViewerRegion *regionp);
- void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type);
- void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type);
- void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp);
- void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp);
- void recordRequestCacheMissesEvent(S32 count);
- void endObjectUpdateEvents();
+ void objectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordObjectUpdateEvent(local_id, update_type, objectp, msg_size);
+#endif
+ }
+
+ void cacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordCacheFullUpdate(local_id, update_type, update_result, objectp, msg_size);
+#endif
+ }
+
+ void requestCacheMissesEvent(S32 count)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordRequestCacheMissesEvent(count);
+#endif
+ }
+
+ void textureFetch(S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordTextureFetch(msg_size);
+#endif
+ }
+
+ void log(F32 interval)
+ {
+#if LL_RECORD_VIEWER_STATS
+ writeToLog(interval);
+#endif
+ }
F32 getTimeSinceStart();
private:
+ void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size);
+ void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size);
+ void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size);
+ void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size);
+ void recordRequestCacheMissesEvent(S32 count);
+ void recordTextureFetch(S32 msg_size);
+ void writeToLog(F32 interval);
+
static LLViewerStatsRecorder* sInstance;
LLFILE * mObjectCacheFile; // File to write data into
LLFrameTimer mTimer;
- LLViewerRegion* mRegionp;
F64 mStartTime;
- F64 mProcessingTime;
+ F64 mLastSnapshotTime;
S32 mObjectCacheHitCount;
+ S32 mObjectCacheHitSize;
S32 mObjectCacheMissFullCount;
+ S32 mObjectCacheMissFullSize;
S32 mObjectCacheMissCrcCount;
+ S32 mObjectCacheMissCrcSize;
S32 mObjectFullUpdates;
+ S32 mObjectFullUpdatesSize;
S32 mObjectTerseUpdates;
+ S32 mObjectTerseUpdatesSize;
S32 mObjectCacheMissRequests;
S32 mObjectCacheMissResponses;
+ S32 mObjectCacheMissResponsesSize;
S32 mObjectCacheUpdateDupes;
S32 mObjectCacheUpdateChanges;
S32 mObjectCacheUpdateAdds;
S32 mObjectCacheUpdateReplacements;
S32 mObjectUpdateFailures;
+ S32 mObjectUpdateFailuresSize;
+ S32 mTextureFetchSize;
void clearStats();
};
-#endif // LL_RECORD_VIEWER_STATS
#endif // LLVIEWERSTATSRECORDER_H
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 99102309a1..122d8f4a96 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -1144,6 +1144,14 @@ void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc
{
preview->setAuxItem( item );
preview->setNotecardInfo(mNotecardInventoryID, mObjectID);
+ if (preview->hasString("Title"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[NAME]"] = item->getName();
+ LLUIString title = preview->getString("Title", args);
+ preview->setTitle(title.getString());
+ }
+ preview->getChild<LLUICtrl>("desc")->setValue(item->getDescription());
}
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 8eb8717de2..78e8742143 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -39,7 +39,6 @@
#include "llimagebmp.h"
#include "llimagej2c.h"
#include "llimagetga.h"
-#include "llmemtype.h"
#include "llstl.h"
#include "llvfile.h"
#include "llvfs.h"
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 2ea9a07e9a..2ea9a07e9a 100755..100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index e4669cde34..7484b7352d 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -67,12 +67,12 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
U32 LLViewerTextureList::sTextureBits = 0;
U32 LLViewerTextureList::sTexturePackets = 0;
S32 LLViewerTextureList::sNumImages = 0;
-LLStat LLViewerTextureList::sNumImagesStat(32, TRUE);
-LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE);
-LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE);
-LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE);
-LLStat LLViewerTextureList::sRawMemStat(32, TRUE);
-LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE);
+LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE);
+LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE);
+LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE);
+LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE);
+LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE);
+LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE);
LLViewerTextureList gTextureList;
static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
@@ -1006,14 +1006,6 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
break;
}
}
- //if (fetch_count == 0)
- //{
- // gDebugTimers[0].pause();
- //}
- //else
- //{
- // gDebugTimers[0].unpause();
- //}
return image_op_timer.getElapsedTimeF32();
}
@@ -1385,7 +1377,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
- LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
LLFastTimer t(FTM_PROCESS_IMAGES);
// Receives image packet, copy into image object,
diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h
index 3bc95cbfbf..2826e6c316 100644
--- a/indra/newview/llviewervisualparam.h
+++ b/indra/newview/llviewervisualparam.h
@@ -65,6 +65,7 @@ protected:
// VIRTUAL CLASS
// a viewer side interface class for a generalized parametric modification of the avatar mesh
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLViewerVisualParam : public LLVisualParam
{
public:
@@ -104,6 +105,6 @@ public:
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLViewerVisualParam_H
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1798d554b9..79cdd732e7 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -77,6 +77,7 @@
#include "llmediaentry.h"
#include "llurldispatcher.h"
#include "raytrace.h"
+#include "llstat.h"
// newview includes
#include "llagent.h"
@@ -334,27 +335,24 @@ public:
if (gSavedSettings.getBOOL("DebugShowTime"))
{
- const U32 y_inc2 = 15;
- for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin();
- iter != gDebugTimers.rend(); ++iter)
{
- S32 idx = iter->first;
- LLFrameTimer& timer = iter->second;
+ const U32 y_inc2 = 15;
+ LLFrameTimer& timer = gTextureTimer;
F32 time = timer.getElapsedTimeF32();
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
- std::string label = gDebugTimerLabel[idx];
- if (label.empty()) label = llformat("Debug: %d", idx);
- addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2;
+ addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2;
}
+ {
F32 time = gFrameTimeSeconds;
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc;
}
+ }
#if LL_WINDOWS
if (gSavedSettings.getBOOL("DebugShowMemory"))
@@ -615,7 +613,7 @@ public:
addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount,
LLMeshRepository::sHTTPRetryCount));
ypos += y_inc;
-
+
addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing));
ypos += y_inc;
@@ -1542,7 +1540,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
- mProgressView(NULL)
+ mProgressView(NULL),
+ mMouseVelocityStat(new LLStat("Mouse Velocity"))
{
// gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
// pass its value right now. Instead, pass it a nullary function that
@@ -1935,7 +1934,7 @@ void LLViewerWindow::initWorldUI()
panel_ssf_container->addChild(panel_rebake_navmesh);
panel_ssf_container->setVisible(TRUE);
-
+
// Load and make the toolbars visible
// Note: we need to load the toolbars only *after* the user is logged in and IW
if (gToolBarView)
@@ -1981,12 +1980,12 @@ void LLViewerWindow::shutdownViews()
gMorphView->setVisible(FALSE);
}
llinfos << "Global views cleaned." << llendl ;
-
+
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
llinfos << "LLModalDialog shut down." << llendl;
-
+
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
if (LLNavigationBar::instanceExists())
@@ -1994,17 +1993,17 @@ void LLViewerWindow::shutdownViews()
delete LLNavigationBar::getInstance();
}
llinfos << "LLNavigationBar destroyed." << llendl ;
-
+
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
cleanup_menus();
llinfos << "menus destroyed." << llendl ;
-
+
// Delete all child views.
delete mRootView;
mRootView = NULL;
llinfos << "RootView deleted." << llendl ;
-
+
// Automatically deleted as children of mRootView. Fix the globals.
gStatusBar = NULL;
gIMMgr = NULL;
@@ -2072,6 +2071,8 @@ LLViewerWindow::~LLViewerWindow()
delete mDebugText;
mDebugText = NULL;
+
+ delete mMouseVelocityStat;
}
@@ -3245,7 +3246,7 @@ void LLViewerWindow::updateMouseDelta()
mouse_vel.setVec((F32) dx, (F32) dy);
}
- mMouseVelocityStat.addValue(mouse_vel.magVec());
+ mMouseVelocityStat->addValue(mouse_vel.magVec());
}
void LLViewerWindow::updateKeyboardFocus()
@@ -4234,15 +4235,49 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_height = llmin(image_height, window_height);
}
+ S32 original_width = 0;
+ S32 original_height = 0;
+ bool reset_deferred = false;
+
+ LLRenderTarget scratch_space;
+
F32 scale_factor = 1.0f ;
if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))
{
+ if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
+ {
+ if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))
+ {
+ original_width = gPipeline.mDeferredScreen.getWidth();
+ original_height = gPipeline.mDeferredScreen.getHeight();
+
+ if (gPipeline.allocateScreenBuffer(image_width, image_height))
+ {
+ window_width = image_width;
+ window_height = image_height;
+ snapshot_width = image_width;
+ snapshot_height = image_height;
+ reset_deferred = true;
+ mWorldViewRectRaw.set(0, image_height, image_width, 0);
+ scratch_space.bindTarget();
+ }
+ else
+ {
+ scratch_space.release();
+ gPipeline.allocateScreenBuffer(original_width, original_height);
+ }
+ }
+ }
+
+ if (!reset_deferred)
+ {
// if image cropping or need to enlarge the scene, compute a scale_factor
F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
snapshot_width = (S32)(ratio * image_width) ;
snapshot_height = (S32)(ratio * image_height) ;
scale_factor = llmax(1.0f, 1.0f / ratio) ;
}
+ }
if (show_ui && scale_factor > 1.f)
{
@@ -4430,6 +4465,15 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
gPipeline.resetDrawOrders();
}
+ if (reset_deferred)
+ {
+ mWorldViewRectRaw = window_rect;
+ scratch_space.flush();
+ scratch_space.release();
+ gPipeline.allocateScreenBuffer(original_width, original_height);
+
+ }
+
if (high_res)
{
send_agent_resume();
@@ -4726,7 +4770,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
LLViewerDynamicTexture::restoreGL();
LLVOAvatar::restoreGL();
LLVOPartGroup::restoreGL();
-
+
gResizeScreenTexture = TRUE;
gWindowResized = TRUE;
@@ -5214,8 +5258,8 @@ void LLPickInfo::getSurfaceInfo()
LLFace* facep = objectp->mDrawable->getFace(mObjectFace);
if (facep)
{
- mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal);
- }
+ mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal);
+ }
}
// and XY coords:
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 6efcaeaf18..5f475fe145 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -41,7 +41,6 @@
#include "llcursortypes.h"
#include "llwindowcallbacks.h"
#include "lltimer.h"
-#include "llstat.h"
#include "llmousehandler.h"
#include "llhandle.h"
#include "llinitparam.h"
@@ -50,7 +49,7 @@
#include <boost/signals2.hpp>
#include <boost/scoped_ptr.hpp>
-
+class LLStat;
class LLView;
class LLViewerObject;
class LLUUID;
@@ -251,7 +250,7 @@ public:
S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; }
S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; }
LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
- LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; }
+ LLStat* getMouseVelocityStat() { return mMouseVelocityStat; }
BOOL getLeftMouseDown() const { return mLeftMouseDown; }
BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
BOOL getRightMouseDown() const { return mRightMouseDown; }
@@ -428,7 +427,7 @@ private:
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
LLCoordGL mLastMousePoint; // Mouse point at last frame.
LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
- LLStat mMouseVelocityStat;
+ LLStat* mMouseVelocityStat;
BOOL mLeftMouseDown;
BOOL mMiddleMouseDown;
BOOL mRightMouseDown;
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index ec932501e5..abb5153480 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -457,8 +457,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
texturep->createGLTexture(0, raw);
}
texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin);
- LLSurface::sTextureUpdateTime += gen_timer.getElapsedTimeF32();
- LLSurface::sTexelsUpdated += (tex_x_end - tex_x_begin) * (tex_y_end - tex_y_begin);
for (S32 i = 0; i < 4; i++)
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 366b6004be..d366455a62 100755..100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -695,7 +695,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mLastRezzedStatus(-1)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
@@ -1739,8 +1738,6 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
@@ -1782,8 +1779,6 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
LLViewerJoint* joint = NULL;
if (info->mIsJoint)
@@ -1849,8 +1844,6 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// allocate joints
//-------------------------------------------------------------------------
@@ -1921,8 +1914,6 @@ void LLVOAvatar::startDefaultMotions()
//-----------------------------------------------------------------------------
void LLVOAvatar::buildCharacter()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// remove all references to our existing skeleton
// so we can rebuild it
@@ -2072,8 +2063,6 @@ void LLVOAvatar::buildCharacter()
//-----------------------------------------------------------------------------
void LLVOAvatar::releaseMeshData()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy)
{
return;
@@ -2128,7 +2117,6 @@ void LLVOAvatar::releaseMeshData()
void LLVOAvatar::restoreMeshData()
{
llassert(!isSelf());
- LLMemType mt(LLMemType::MTYPE_AVATAR);
//llinfos << "Restoring" << llendl;
mMeshValid = TRUE;
@@ -2344,8 +2332,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
LLVector3 old_vel = getVelocity();
const BOOL has_name = !getNVPair("FirstName");
@@ -2425,7 +2411,6 @@ void LLVOAvatar::dumpAnimationState()
//------------------------------------------------------------------------
void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
LLFastTimer t(FTM_AVATAR_UPDATE);
if (isDead())
@@ -3463,8 +3448,6 @@ bool LLVOAvatar::isVisuallyMuted() const
//------------------------------------------------------------------------
BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// clear debug text
mDebugText.clear();
if (LLVOAvatar::sShowAnimationDebug)
@@ -4793,8 +4776,6 @@ const LLUUID& LLVOAvatar::getStepSound() const
//-----------------------------------------------------------------------------
void LLVOAvatar::processAnimationStateChanges()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) )
{
startMotion(ANIM_AGENT_WALK_ADJUST);
@@ -4885,8 +4866,6 @@ void LLVOAvatar::processAnimationStateChanges()
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start )
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
BOOL result = FALSE;
if ( start ) // start animation
@@ -5021,8 +5000,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl;
LLUUID remap_id = remapMotionID(id);
@@ -5851,8 +5828,6 @@ BOOL LLVOAvatar::isActive() const
//-----------------------------------------------------------------------------
void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if (mDrawable.isNull())
{
return;
@@ -7297,8 +7272,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
return;
}
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
mFirstAppearanceMessageReceived = TRUE;
@@ -7499,7 +7472,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
if (!userdata) return;
//llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl;
- const LLMemType mt(LLMemType::MTYPE_AVATAR);
const LLUUID id = src_vi->getID();
LLTextureMaskData* maskData = (LLTextureMaskData*) userdata;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 1adb680962..1adb680962 100755..100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7a81063f83..e32fd3c3c8 100755..100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -257,8 +257,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf()
BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// add special-purpose "screen" joint
mScreenp = new LLViewerJoint("mScreen", NULL);
// for now, put screen at origin, as it is only used during special
@@ -652,8 +650,6 @@ BOOL LLVOAvatarSelf::loadLayersets()
// virtual
BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// update screen joint size
if (mScreenp)
{
@@ -1008,8 +1004,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
// virtual
void LLVOAvatarSelf::restoreMeshData()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//llinfos << "Restoring" << llendl;
mMeshValid = TRUE;
updateJointLODs();
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 7bd0c0bf93..7bd0c0bf93 100755..100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 566c33c0af..4dca87652d 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -675,7 +675,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB");
void LLGrassPartition::getGeometry(LLSpatialGroup* group)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLFastTimer ftm(FTM_REBUILD_GRASS_VB);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index e4f9915e93..fa34a6f1f5 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -599,7 +599,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom");
void LLParticlePartition::getGeometry(LLSpatialGroup* group)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e99898a83c..813fa72cc3 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3961,7 +3961,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LLFastTimer t(FTM_REGISTER_FACE);
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
{
@@ -4888,11 +4887,19 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
facep->setTextureIndex(cur_tex);
texture_list.push_back(tex);
- //if (can_batch_texture(facep))
- {
+ if (can_batch_texture(facep))
+ { //populate texture_list with any textures that can be batched
+ //move i to the next unbatchable face
while (i != faces.end())
{
facep = *i;
+
+ if (!can_batch_texture(facep))
+ { //face is bump mapped or has an animated texture matrix -- can't
+ //batch more than 1 texture at a time
+ break;
+ }
+
if (facep->getTexture() != tex)
{
if (distance_sort)
@@ -4918,12 +4925,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
cur_tex++;
}
- if (!can_batch_texture(facep))
- { //face is bump mapped or has an animated texture matrix -- can't
- //batch more than 1 texture at a time
- break;
- }
-
if (cur_tex >= texture_index_channels)
{ //cut batches when index channels are depleted
break;
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index a33f42cf84..7f17fd3e56 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -301,7 +301,7 @@ void LLVOWLSky::restoreGL()
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}
-static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry");
+static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry");
BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
{
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 78ee3e4fd9..09d17b3701 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -138,7 +138,6 @@ void LLWorld::destroyClass()
LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
{
- LLMemType mt(LLMemType::MTYPE_REGIONS);
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
if (regionp)
@@ -644,7 +643,6 @@ void LLWorld::updateVisibilities()
void LLWorld::updateRegions(F32 max_update_time)
{
- LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS);
LLTimer update_timer;
BOOL did_one = FALSE;
@@ -1194,7 +1192,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
- if (!pVOAvatar->isDead() && !pVOAvatar->isSelf())
+ if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy)
{
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
LLUUID uuid = pVOAvatar->getID();
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a3ccf87cfc..ccc513b80d 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1320,7 +1320,7 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- gGL.translatef((F32)x, (F32)y, 0.f);
+ gGL.translatef((F32)x * LLUI::sGLScaleFactor.mV[VX], (F32)y * LLUI::sGLScaleFactor.mV[VY], 0.f);
gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color);
gGL.popMatrix();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 920bac93a2..86791a37fb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -35,7 +35,6 @@
#include "llviewercontrol.h"
#include "llfasttimer.h"
#include "llfontgl.h"
-#include "llmemtype.h"
#include "llnamevalue.h"
#include "llpointer.h"
#include "llprimitive.h"
@@ -464,8 +463,6 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name)
void LLPipeline::init()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
-
refreshCachedSettings();
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
@@ -777,7 +774,7 @@ void LLPipeline::allocatePhysicsBuffer()
}
}
-void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
+bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
refreshCachedSettings();
U32 samples = RenderFSAASamples;
@@ -787,8 +784,13 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
+ bool ret = true;
+
if (!allocateScreenBuffer(resX, resY, samples))
{
+ //failed to allocate at requested specification, return false
+ ret = false;
+
releaseScreenBuffers();
//reduce number of samples
while (samples > 0)
@@ -796,7 +798,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
samples /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{ //success
- return;
+ return ret;
}
releaseScreenBuffers();
}
@@ -809,20 +811,22 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
resY /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{
- return;
+ return ret;
}
releaseScreenBuffers();
resX /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{
- return;
+ return ret;
}
releaseScreenBuffers();
}
llwarns << "Unable to allocate screen buffer at any resolution!" << llendl;
}
+
+ return ret;
}
@@ -867,7 +871,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (!mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (samples > 0)
{
- if (!mFXAABuffer.allocate(nhpo2(resX), nhpo2(resY), GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
+ if (!mFXAABuffer.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
}
else
{
@@ -901,7 +905,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
}
}
- U32 width = nhpo2(U32(resX*scale))/2;
+ U32 width = (U32)(resX*scale);
U32 height = width;
if (shadow_detail > 1)
@@ -1127,7 +1131,6 @@ void LLPipeline::releaseScreenBuffers()
void LLPipeline::createGLBuffers()
{
stop_glerror();
- LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
assertInitialized();
updateRenderDeferred();
@@ -1264,7 +1267,6 @@ void LLPipeline::createLUTBuffers()
void LLPipeline::restoreGL()
{
- LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL);
assertInitialized();
if (mVertexShadersEnabled)
@@ -1326,7 +1328,6 @@ BOOL LLPipeline::canUseAntiAliasing() const
void LLPipeline::unloadShaders()
{
- LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS);
LLViewerShaderMgr::instance()->unloadShaders();
mVertexShadersLoaded = 0;
@@ -1358,7 +1359,6 @@ S32 LLPipeline::getMaxLightingDetail() const
S32 LLPipeline::setLightingDetail(S32 level)
{
- LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
refreshCachedSettings();
if (level < 0)
@@ -1520,7 +1520,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
LLDrawPool *poolp = findPool(type, tex0);
if (poolp)
{
@@ -1537,7 +1536,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
// static
LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
U32 type = getPoolTypeFromTE(te, imagep);
return gPipeline.getPool(type, imagep);
}
@@ -1545,8 +1543,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture*
//static
U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
- LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE);
-
if (!te || !imagep)
{
return 0;
@@ -1575,7 +1571,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
void LLPipeline::addPool(LLDrawPool *new_poolp)
{
- LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL);
assertInitialized();
mPools.insert(new_poolp);
addToQuickLookup( new_poolp );
@@ -1583,7 +1578,6 @@ void LLPipeline::addPool(LLDrawPool *new_poolp)
void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
- LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE);
LLDrawable *drawable = new LLDrawable();
vobj->mDrawable = drawable;
@@ -1697,8 +1691,6 @@ void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
U32 LLPipeline::addObject(LLViewerObject *vobj)
{
- LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
-
if (RenderDelayCreation)
{
mCreateQ.push_back(vobj);
@@ -1714,7 +1706,6 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
LLFastTimer ftm(FTM_PIPELINE_CREATE);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
LLTimer update_timer;
@@ -1900,7 +1891,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move");
void LLPipeline::updateMove()
{
LLFastTimer t(FTM_UPDATE_MOVE);
- LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
if (FreezeTime)
{
@@ -2253,7 +2243,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling");
void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep)
{
LLFastTimer t(FTM_CULL);
- LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL);
grabReferences(result);
@@ -2607,7 +2596,6 @@ void LLPipeline::rebuildPriorityGroups()
{
LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
LLTimer update_timer;
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
assertInitialized();
gMeshRepo.notifyLoadedMeshes();
@@ -2678,7 +2666,6 @@ void LLPipeline::rebuildGroups()
void LLPipeline::updateGeom(F32 max_dtime)
{
LLTimer update_timer;
- LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM);
LLPointer<LLDrawable> drawablep;
LLFastTimer t(FTM_GEO_UPDATE);
@@ -2772,8 +2759,6 @@ void LLPipeline::updateGeom(F32 max_dtime)
void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
-
if(drawablep && !drawablep->isDead())
{
if (drawablep->isSpatialBridge())
@@ -2813,8 +2798,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
{
- LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED);
-
if (!drawablep)
{
//llerrs << "Sending null drawable to moved list!" << llendl;
@@ -2859,8 +2842,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT);
-
if (!drawablep || drawablep->isDead())
{
return;
@@ -2886,8 +2867,6 @@ static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
-
assertInitialized();
glClear(GL_DEPTH_BUFFER_BIT);
@@ -2941,8 +2920,6 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
void LLPipeline::markTextured(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED);
-
if (drawablep && !drawablep->isDead() && assertInitialized())
{
mRetexturedList.insert(drawablep);
@@ -2993,8 +2970,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
-
if (group && !group->isDead() && group->mSpatialPartition)
{
if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD)
@@ -3034,8 +3009,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD);
-
if (drawablep && !drawablep->isDead() && assertInitialized())
{
if (!drawablep->isState(LLDrawable::BUILT))
@@ -3082,7 +3055,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
LLFastTimer ftm(FTM_STATESORT);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
//LLVertexBuffer::unbind();
@@ -3183,7 +3155,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (group->changeLOD())
{
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
@@ -3202,7 +3173,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (bridge->getSpatialGroup()->changeLOD())
{
bool force_update = false;
@@ -3212,8 +3182,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
-
if (!drawablep
|| drawablep->isDead()
|| !hasRenderType(drawablep->getRenderType()))
@@ -3504,7 +3472,6 @@ void renderSoundHighlights(LLDrawable* drawablep)
void LLPipeline::postSort(LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
LLFastTimer ftm(FTM_STATESORT_POSTSORT);
assertInitialized();
@@ -3756,7 +3723,6 @@ void LLPipeline::postSort(LLCamera& camera)
void render_hud_elements()
{
- LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS);
LLFastTimer t(FTM_RENDER_UI);
gPipeline.disableLights();
@@ -3811,8 +3777,6 @@ void render_hud_elements()
void LLPipeline::renderHighlights()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL);
-
assertInitialized();
// Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
@@ -3976,7 +3940,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM);
LLFastTimer t(FTM_RENDER_GEOMETRY);
assertInitialized();
@@ -4229,7 +4192,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
- LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
LLFastTimer t(FTM_RENDER_GEOMETRY);
LLFastTimer t2(FTM_DEFERRED_POOLS);
@@ -4326,7 +4288,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
{
- LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
LLFastTimer t(FTM_POST_DEFERRED_POOLS);
U32 cur_type = 0;
@@ -4422,7 +4383,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
void LLPipeline::renderGeomShadow(LLCamera& camera)
{
- LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@@ -4576,8 +4536,6 @@ void LLPipeline::renderPhysicsDisplay()
void LLPipeline::renderDebug()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
-
assertInitialized();
bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD);
@@ -5230,7 +5188,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
void LLPipeline::rebuildPools()
{
LLFastTimer t(FTM_REBUILD_POOLS);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
assertInitialized();
@@ -5270,8 +5227,6 @@ void LLPipeline::rebuildPools()
void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP);
-
assertInitialized();
switch( new_poolp->getType() )
@@ -5437,7 +5392,6 @@ void LLPipeline::removePool( LLDrawPool* poolp )
void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
{
assertInitialized();
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
switch( poolp->getType() )
{
case LLDrawPool::POOL_SIMPLE:
@@ -6860,7 +6814,6 @@ void LLPipeline::doResetVertexBuffers()
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
{
- LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
@@ -6933,7 +6886,6 @@ static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom");
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
- LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
if (!(gPipeline.canUseVertexShaders() &&
sRenderGlow))
{
@@ -7085,11 +7037,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGlowProgram.unbind();
- if (LLRenderTarget::sUseFBO)
+ /*if (LLRenderTarget::sUseFBO)
{
LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
- }
+ }*/
gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
@@ -7965,10 +7917,6 @@ void LLPipeline::renderDeferredLighting()
gGL.popMatrix();
stop_glerror();
- //copy depth and stencil from deferred screen
- //mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
- // 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
-
mScreen.bindTarget();
// clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
glClearColor(0,0,0,0);
@@ -8740,8 +8688,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
- LLRenderTarget::unbindTarget();
-
LLPipeline::sReflectionRender = FALSE;
if (!LLRenderTarget::sUseFBO)
@@ -9999,7 +9945,6 @@ static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
- LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
LLGLState::checkStates();
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index fd2a1e06cd..318053355a 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -119,8 +119,14 @@ public:
void createGLBuffers();
void createLUTBuffers();
- void allocateScreenBuffer(U32 resX, U32 resY);
+ //allocate the largest screen buffer possible up to resX, resY
+ //returns true if full size buffer allocated, false if some other size is allocated
+ bool allocateScreenBuffer(U32 resX, U32 resY);
+
+ //attempt to allocate screen buffers at resX, resY
+ //returns true if allocation successful, false otherwise
bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
+
void allocatePhysicsBuffer();
void resetVertexBuffers(LLDrawable* drawable);
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 2e29c61cb2..6021ba0a5a 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -134,16 +134,6 @@
top_delta="-25"
name="Pipette"
width="28" />
- <check_box
- follows="left|bottom"
- height="20"
- initial_value="true"
- label="Live Preview"
- layout="topleft"
- left="4"
- name="apply_immediate_check"
- top="262"
- width="120" />
<text
follows="left|bottom"
height="20"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 5204efbf65..436e9f8fed 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2994,7 +2994,7 @@ even though the user gets a free copy.
use_ellipses="true"
read_only="true"
name="media_info"
- width="280" />
+ width="180" />
<web_browser
visible="false"
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index 06d4327293..eb01294831 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -5,7 +5,7 @@
height="640"
layout="topleft"
min_height="230"
- min_width="650"
+ min_width="750"
name="gui_preview_tool"
help_topic="gui_preview_tool"
single_instance="true"
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index fc7272b904..3b8ace6308 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -195,6 +195,20 @@
<menu_item_separator name="sepatator2" />
<menu_item_call
+ label="Expand all folders"
+ layout="topleft"
+ name="expand">
+ <on_click
+ function="Gear.Expand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Collapse all folders"
+ layout="topleft"
+ name="collapse">
+ <on_click
+ function="Gear.Collapse" />
+ </menu_item_call>
+ <menu_item_call
label="Rename Outfit"
layout="topleft"
name="rename">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 1aa55acf2d..c6d9f9ef8f 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -276,30 +276,39 @@
parameter="gestures" />
</menu_item_check>
<menu_item_separator/>
- <menu_item_call
+ <menu_item_check
label="Friends"
name="My Friends"
shortcut="control|shift|F">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="friends_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
+ </menu_item_check>
+ <menu_item_check
label="Groups"
name="My Groups"
shortcut="control|shift|G">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="groups_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="groups_panel" />
- </menu_item_call>
- <menu_item_call
+ </menu_item_check>
+ <menu_item_check
label="Nearby people"
name="Active Speakers"
shortcut="control|shift|A">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="nearby_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="nearby_panel" />
- </menu_item_call>
+ </menu_item_check>
<menu_item_call
label="Block List"
name="Block List">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index f0a126724b..8e6de6ed4f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7576,18 +7576,6 @@ We cannot display a preview of this texture because it is no-copy and/or no-tran
<notification
icon="alertmodal.tga"
- name="LivePreviewUnavailable"
- type="alert">
-
-We cannot display a preview of this texture because it is no-copy and/or no-transfer.
- <usetemplate
- ignoretext="Warn me that Live Preview mode is not available for no-copy and/or no-transfer textures"
- name="okignore"
- yestext="OK"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">
Are you sure you want to leave this call?
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index eea2606125..df91ad8b5e 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -254,7 +254,7 @@ things in this group. There&apos;s a broad variety of Abilities.
column_padding="0"
draw_stripes="true"
height="200"
- follows="left|top"
+ follows="left|top|right"
layout="topleft"
left="0"
right="-1"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index cdf14572fe..e844a15118 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -30,7 +30,7 @@
(This page does not pass the specified whitelist)
</text>
<line_editor
- max_length="1024"
+ max_length_bytes="1024"
bottom_delta="-24"
enabled="true"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index f6a8af0973..765b07ed8b 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -158,6 +158,7 @@
text_readonly_color="DkGray"
width="487"
show_line_numbers="true"
+ enable_tooltip_paste="true"
word_wrap="true">
Loading...
</text_editor>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index e9a787cef0..f1ae14809f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -292,6 +292,10 @@
label="Open"
name="Open"
value="Open" />
+ <combo_box.item
+ label="Zoom"
+ name="Zoom"
+ value="Zoom" />
</combo_box>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 15eb46c348..2a2dc6dca1 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1447,7 +1447,7 @@ integer llScriptDanger(vector pos)
Returns TRUE if pos is over public land, sandbox land, land that doesn&apos;t allow everyone to edit and build, or land that doesn&apos;t allow outside scripts
</string>
<string name="LSLTipText_llDialog" translate="false">
-llDialog(key avatar, string message, list buttons, integer chat_channel
+llDialog(key avatar, string message, list buttons, integer chat_channel)
Shows a dialog box on the avatar&apos;s screen with a message and up to 12 buttons.
If a button is pressed, the avatar says the text of the button label on chat_channel.
</string>
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index f8923b9868..f8923b9868 100755..100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp