Commits

davep committed f4481df Merge
  • Participants
  • Parent commits f2b1e61, 5ca5301
  • Tags DRTVWR-246

Comments (0)

Files changed (8)

File indra/cmake/GooglePerfTools.cmake

 
 # If you want to enable or disable TCMALLOC in viewer builds, this is the place.
 # set ON or OFF as desired.
-set (USE_TCMALLOC ON)
+set (USE_TCMALLOC OFF)
 
 if (STANDALONE)
   include(FindGooglePerfTools)

File indra/llcommon/llsys.cpp

 	state.dwLength = sizeof(state);
 	GlobalMemoryStatusEx(&state);
 
-	stats.add("Percent Memory use", state.dwMemoryLoad);
-	stats.add("Total Physical KB",  state.ullTotalPhys/1024);
-	stats.add("Avail Physical KB",  state.ullAvailPhys/1024);
-	stats.add("Total page KB",      state.ullTotalPageFile/1024);
-	stats.add("Avail page KB",      state.ullAvailPageFile/1024);
-	stats.add("Total Virtual KB",   state.ullTotalVirtual/1024);
-	stats.add("Avail Virtual KB",   state.ullAvailVirtual/1024);
+	DWORDLONG div = 1024;
+
+	stats.add("Percent Memory use", state.dwMemoryLoad/div);
+	stats.add("Total Physical KB",  state.ullTotalPhys/div);
+	stats.add("Avail Physical KB",  state.ullAvailPhys/div);
+	stats.add("Total page KB",      state.ullTotalPageFile/div);
+	stats.add("Avail page KB",      state.ullAvailPageFile/div);
+	stats.add("Total Virtual KB",   state.ullTotalVirtual/div);
+	stats.add("Avail Virtual KB",   state.ullAvailVirtual/div);
 
 	PERFORMANCE_INFORMATION perf;
 	perf.cb = sizeof(perf);
 	GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem));
 
 	stats.add("Page Fault Count",              pmem.PageFaultCount);
-	stats.add("PeakWorkingSetSize KB",         pmem.PeakWorkingSetSize/1024);
-	stats.add("WorkingSetSize KB",             pmem.WorkingSetSize/1024);
-	stats.add("QutaPeakPagedPoolUsage KB",     pmem.QuotaPeakPagedPoolUsage/1024);
-	stats.add("QuotaPagedPoolUsage KB",        pmem.QuotaPagedPoolUsage/1024);
-	stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/1024);
-	stats.add("QuotaNonPagedPoolUsage KB",     pmem.QuotaNonPagedPoolUsage/1024);
-	stats.add("PagefileUsage KB",              pmem.PagefileUsage/1024);
-	stats.add("PeakPagefileUsage KB",          pmem.PeakPagefileUsage/1024);
-	stats.add("PrivateUsage KB",               pmem.PrivateUsage/1024);
+	stats.add("PeakWorkingSetSize KB",         pmem.PeakWorkingSetSize/div);
+	stats.add("WorkingSetSize KB",             pmem.WorkingSetSize/div);
+	stats.add("QutaPeakPagedPoolUsage KB",     pmem.QuotaPeakPagedPoolUsage/div);
+	stats.add("QuotaPagedPoolUsage KB",        pmem.QuotaPagedPoolUsage/div);
+	stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/div);
+	stats.add("QuotaNonPagedPoolUsage KB",     pmem.QuotaNonPagedPoolUsage/div);
+	stats.add("PagefileUsage KB",              pmem.PagefileUsage/div);
+	stats.add("PeakPagefileUsage KB",          pmem.PeakPagefileUsage/div);
+	stats.add("PrivateUsage KB",               pmem.PrivateUsage/div);
 
 #elif LL_DARWIN
 

File indra/newview/CMakeLists.txt

     set_target_properties(${VIEWER_BINARY_NAME}
         PROPERTIES
         # *TODO -reenable this once we get server usage sorted out
-        LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
-        LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
-        LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
+        LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE"
+        LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE"
+        LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE"
         )
     if(USE_PRECOMPILED_HEADERS)
         set_target_properties(

File indra/newview/app_settings/settings.xml

       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
     <key>MemoryPrivatePoolSize</key>
     <map>

File indra/newview/llappviewer.cpp

 	//set the max heap size.
 	initMaxHeapSize() ;
 
-	LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ;
+	LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
 
 	// write Google Breakpad minidump files to our log directory
 	std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");

File indra/newview/llappviewerwin32.cpp

 	
 #if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD
 	_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit
-#elif 1
+#elif 0
 	// Experimental - enable the low fragmentation heap
 	// This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations)
 	// Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1

File indra/newview/llviewertexture.cpp

 void LLViewerTexture::init(bool firstinit)
 {
 	mBoostLevel = LLViewerTexture::BOOST_NONE;
+	mSelectedTime = 0.f;
 
 	mFullWidth = 0;
 	mFullHeight = 0;
 	if(mBoostLevel != level)
 	{
 		mBoostLevel = level ;
-		if(mBoostLevel != LLViewerTexture::BOOST_NONE)
+		if(mBoostLevel != LLViewerTexture::BOOST_NONE && 
+			mBoostLevel != LLViewerTexture::BOOST_SELECTED)
 		{
 			setNoDelete() ;		
 		}
 	}
+
+	if (mBoostLevel == LLViewerTexture::BOOST_SELECTED)
+	{
+		mSelectedTime = gFrameTimeSeconds;
+	}
+
 }
 
 
 	for(U32 i = 0 ; i < mNumFaces ; i++)
 	{				
 		LLFace* facep = mFaceList[i] ;
-		if(facep->getDrawable()->isRecentlyVisible())
+		LLDrawable* drawable = facep->getDrawable();
+		if (drawable)
 		{
-			addTextureStats(facep->getVirtualSize()) ;
-			setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+			if(drawable->isRecentlyVisible())
+			{
+				if (getBoostLevel() == LLViewerTexture::BOOST_NONE && 
+					drawable->getVObj() && drawable->getVObj()->isSelected())
+				{
+					setBoostLevel(LLViewerTexture::BOOST_SELECTED);
+				}
+				addTextureStats(facep->getVirtualSize()) ;
+				setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+			}
 		}
 	}
 
+	//reset whether or not a face was selected after 10 seconds
+	const F32 SELECTION_RESET_TIME = 10.f;
+
+	if (getBoostLevel() ==  LLViewerTexture::BOOST_SELECTED && 
+		gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME)
+	{
+		setBoostLevel(LLViewerTexture::BOOST_NONE);
+	}
+
 	if(mMaxVirtualSizeResetCounter > 0)
 	{
 		mMaxVirtualSizeResetCounter--;

File indra/newview/llviewertexture.h

 protected:
 	LLUUID mID;
 	S32 mBoostLevel;				// enum describing priority level
+	F32 mSelectedTime;				// time texture was last selected
 	S32 mFullWidth;
 	S32 mFullHeight;
 	BOOL  mUseMipMaps ;