diff options
| author | Richard Linden <none@none> | 2013-08-14 16:10:17 -0700 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2013-08-14 16:10:17 -0700 | 
| commit | bceb1e8abe916cd69e7ac6ab70dc03dc6d76c9df (patch) | |
| tree | 0016163049097d6b55a065b8fafdc609f1879c54 /indra/newview | |
| parent | 52086d4485e004999d097cb66fb5cf63e34203d2 (diff) | |
| parent | 26581404e426b00cd0a07c38b5cb858d5d5faa28 (diff) | |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/newview')
| -rwxr-xr-x | indra/newview/llconversationlog.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llfasttimerview.cpp | 26 | ||||
| -rwxr-xr-x | indra/newview/llfasttimerview.h | 6 | ||||
| -rw-r--r-- | indra/newview/llscenemonitor.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llstartup.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/lltexturefetch.cpp | 7 | ||||
| -rwxr-xr-x | indra/newview/lltextureinfo.cpp | 8 | ||||
| -rwxr-xr-x | indra/newview/lltextureview.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llviewerassetstats.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llviewerobjectlist.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llviewerstats.cpp | 22 | ||||
| -rwxr-xr-x | indra/newview/llviewerstats.h | 8 | ||||
| -rwxr-xr-x | indra/newview/llviewertexture.cpp | 22 | ||||
| -rwxr-xr-x | indra/newview/llviewertexturelist.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llviewertexturelist.h | 8 | ||||
| -rwxr-xr-x | indra/newview/llviewerthrottle.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llvoavatarself.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llvoicevivox.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llworld.cpp | 6 | 
19 files changed, 70 insertions, 71 deletions
| diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 8dd148e304..a17a4e5e21 100755 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -132,7 +132,7 @@ const std::string LLConversation::createTimestamp(const LLUnit<U64, LLUnits::Sec  bool LLConversation::isOlderThan(U32 days) const  { -	LLUnit<U64, LLUnits::Seconds> now = time_corrected(); +	LLUnit<U64, LLUnits::Seconds> now(time_corrected());  	LLUnit<U32, LLUnits::Days> age = now - mTime;  	return age > days; @@ -535,7 +535,7 @@ bool LLConversationLog::loadFromFile(const std::string& filename)  				history_file_name);  		ConversationParams params; -		params.time(time) +		params.time(LLUnits::Seconds::fromValue(time))  			.conversation_type((SessionType)stype)  			.has_offline_ims(has_offline_ims)  			.conversation_name(conv_name_buffer) diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index bb9e474098..11a9a70b18 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -260,7 +260,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)  		TimerBarRow& row = mHoverBarIndex == 0 ? mAverageTimerRow : mTimerBarRows[mScrollIndex + mHoverBarIndex - 1];  		TimerBar* hover_bar = NULL; -		LLUnit<F32, LLUnits::Seconds> mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; +		LLUnits::F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay;  		for (int bar_index = 0, end_index = LLInstanceTracker<LLTrace::TimeBlock>::instanceCount();   			bar_index < end_index;   			++bar_index) @@ -996,7 +996,7 @@ void LLFastTimerView::printLineStats()  			}  			first = false; -			LLUnit<F32, LLUnits::Seconds> ticks; +			LLUnits::F32Seconds ticks;  			if (mStatsIndex == 0)  			{  				ticks = mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH); @@ -1029,7 +1029,7 @@ void LLFastTimerView::drawLineGraph()  	LLLocalClipRect clip(mGraphRect);  	//normalize based on last frame's maximum -	static LLUnit<F32, LLUnits::Seconds> max_time = 0.000001; +	static LLUnits::F32Seconds max_time(0.000001);  	static U32 max_calls = 0;  	static F32 alpha_interp = 0.f; @@ -1060,7 +1060,7 @@ void LLFastTimerView::drawLineGraph()  		}  	} -	LLUnit<F32, LLUnits::Seconds> cur_max = 0; +	LLUnits::F32Seconds cur_max(0);  	U32 cur_max_calls = 0;  	for(timer_tree_iterator_t it = begin_timer_tree(FTM_FRAME);  		it != end_timer_tree(); @@ -1101,7 +1101,7 @@ void LLFastTimerView::drawLineGraph()  			j--)  		{  			LLTrace::Recording& recording = mRecording.getPrevRecording(j); -			LLUnit<F32, LLUnits::Seconds> time = llmax(recording.getSum(*idp), LLUnits::Seconds::fromValue(0.000001)); +			LLUnits::F32Seconds time = llmax(recording.getSum(*idp), LLUnits::F64Seconds(0.000001));  			U32 calls = recording.getSum(idp->callCount());  			if (is_hover_timer) @@ -1146,7 +1146,7 @@ void LLFastTimerView::drawLineGraph()  	max_time = lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f));  	if (llabs((max_time - cur_max).value()) <= 1)  	{ -		max_time = llmax(LLUnits::Microseconds::fromValue(1.f), LLUnits::Microseconds::fromValue(cur_max)); +		max_time = llmax(LLUnits::F32Microseconds(1.f), LLUnits::F32Microseconds(cur_max));  	}  	max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); @@ -1230,7 +1230,7 @@ void LLFastTimerView::drawLegend()  			llassert(idp->getIndex() < sTimerColors.size());  			gl_rect_2d(bar_rect, sTimerColors[idp->getIndex()]); -			LLUnit<F32, LLUnits::Milliseconds> ms = 0; +			LLUnit<F32, LLUnits::Milliseconds> ms(0);  			S32 calls = 0;  			if (mHoverBarIndex > 0 && mHoverID)  			{ @@ -1240,7 +1240,7 @@ void LLFastTimerView::drawLegend()  			}  			else  			{ -				ms = LLUnit<F64, LLUnits::Seconds>(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH)); +				ms = LLUnits::F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH));  				calls = (S32)mRecording.getPeriodMean(idp->callCount(), RUNNING_AVERAGE_WIDTH);  			} @@ -1423,7 +1423,7 @@ void LLFastTimerView::updateTotalTime()  		mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME, 20);  		break;  	default: -		mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(100); +		mTotalTimeDisplay = LLUnits::F64Milliseconds(100);  		break;  	} @@ -1511,14 +1511,14 @@ void LLFastTimerView::drawBars()  static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); -LLUnit<F32, LLUnits::Seconds> LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) +LLUnits::F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index)  {  	LLFastTimer _(FTM_UPDATE_TIMER_BAR_WIDTHS); -	const LLUnit<F32, LLUnits::Seconds> self_time = history_index == -1 +	const LLUnits::F32Seconds self_time = history_index == -1  										? mRecording.getPeriodMean(time_block->selfTime(), RUNNING_AVERAGE_WIDTH)   										: mRecording.getPrevRecording(history_index).getSum(time_block->selfTime()); -	LLUnit<F32, LLUnits::Seconds> full_time = self_time; +	LLUnits::F32Seconds full_time = self_time;  	// reserve a spot for this bar to be rendered before its children  	// even though we don't know its size yet @@ -1544,7 +1544,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer  	LLFastTimer _(FTM_UPDATE_TIMER_BAR_FRACTIONS);  	TimerBar& timer_bar = row.mBars[timer_bar_index]; -	const LLUnit<F32, LLUnits::Seconds> bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; +	const LLUnits::F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime;  	timer_bar.mChildrenStart = timer_bar.mSelfStart + timer_bar.mSelfTime / 2;  	timer_bar.mChildrenEnd = timer_bar.mChildrenStart + timer_bar.mTotalTime - timer_bar.mSelfTime; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 9d88bb2d3f..8f61a2fc87 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -87,7 +87,7 @@ private:  			mFirstChild(false),  			mLastChild(false)  		{} -		LLUnit<F32, LLUnits::Seconds>	mTotalTime, +		LLUnits::F32Seconds	mTotalTime,  										mSelfTime,  										mChildrenStart,  										mChildrenEnd, @@ -113,7 +113,7 @@ private:  		TimerBar*	mBars;  	}; -	LLUnit<F32, LLUnits::Seconds> updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); +	LLUnits::F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index);  	S32 updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0);  	S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0);  	void setPauseState(bool pause_state); @@ -128,7 +128,7 @@ private:  		DISPLAY_HZ  	}								mDisplayType;  	bool							mPauseHistory; -	LLUnit<F64, LLUnits::Seconds>	mAllTimeMax, +	LLUnits::F64Seconds	mAllTimeMax,  									mTotalTimeDisplay;  	S32								mScrollIndex,  									mHoverBarIndex, diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index f0c7a220a4..d16c2d3984 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -525,7 +525,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)  	PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults();  	const U32 frame_count = scene_load_recording.getNumRecordedPeriods(); -	LLUnit<F64, LLUnits::Seconds> frame_time; +	LLUnits::F64Seconds frame_time;  	os << "Stat";  	for (S32 frame = 1; frame <= frame_count; frame++) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3335ff6631..3a3731d519 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1429,7 +1429,7 @@ bool idle_startup()  		LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL;  		gFrameTime    = totalTime(); -		LLUnit<F32, LLUnits::Seconds> last_time = gFrameTimeSeconds; +		LLUnits::F32Seconds last_time = gFrameTimeSeconds;  		gFrameTimeSeconds = (gFrameTime - gStartTime);  		gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 17703fcc21..0e6ef76845 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1888,12 +1888,11 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe  	if (log_to_viewer_log || log_to_sim)  	{ -		U64 timeNow = LLTimer::getTotalTime();  		mFetcher->mTextureInfo.setRequestStartTime(mID, mMetricsStartTime.value());  		mFetcher->mTextureInfo.setRequestType(mID, LLTextureInfoDetails::REQUEST_TYPE_HTTP);  		mFetcher->mTextureInfo.setRequestSize(mID, mRequestedSize);  		mFetcher->mTextureInfo.setRequestOffset(mID, mRequestedOffset); -		mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, timeNow); +		mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, LLTimer::getTotalTime());  	}  	bool success = true; @@ -2394,7 +2393,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image  	  mFetcherLocked(FALSE)  {  	mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); -	mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), LLUnits::Bytes::fromValue(gSavedSettings.getU32("TextureLoggingThreshold"))); +	mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), LLUnits::U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold")));  	LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled");  	if(LLTextureFetchDebugger::isEnabled()) @@ -2762,7 +2761,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,  			discard_level = worker->mDecodedDiscard;  			raw = worker->mRawImage;  			aux = worker->mAuxImage; -			LLUnit<F32, LLUnits::Seconds> cache_read_time = worker->mCacheReadTime; +			LLUnits::F32Seconds cache_read_time(worker->mCacheReadTime);  			if (cache_read_time != 0.f)  			{  				record(sCacheReadLatency, cache_read_time); diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index cd6e7ff464..9dee92bf12 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -219,11 +219,11 @@ void LLTextureInfo::resetTextureStatistics()  	mCurrentStatsBundleStartTime = LLTimer::getTotalTime();  } -LLUnit<U32, LLUnits::Microseconds> LLTextureInfo::getRequestStartTime(const LLUUID& id) +LLUnits::U32Microseconds LLTextureInfo::getRequestStartTime(const LLUUID& id)  {  	if (!has(id))  	{ -		return 0; +		return LLUnits::U32Microseconds(0);  	}  	else  	{ @@ -236,7 +236,7 @@ LLUnit<U32, LLUnits::Bytes> LLTextureInfo::getRequestSize(const LLUUID& id)  {  	if (!has(id))  	{ -		return 0; +		return LLUnits::U32Bytes(0);  	}  	else  	{ @@ -275,7 +275,7 @@ LLUnit<U32, LLUnits::Microseconds> LLTextureInfo::getRequestCompleteTime(const L  {  	if (!has(id))  	{ -		return 0; +		return LLUnits::U32Microseconds(0);  	}  	else  	{ diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 501914a52f..c94064df5f 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -587,7 +587,7 @@ void LLGLTexMemBar::draw()  	left = 550;  	LLUnit<F32, LLUnits::Kibibits> bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); -	LLUnit<F32, LLUnits::Kibibits> max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); +	LLUnit<F32, LLUnits::Kibibits> max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS"));  	color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;  	color[VALPHA] = text_color[VALPHA];  	text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 579567bb14..b176c69691 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -233,7 +233,7 @@ namespace LLViewerAssetStatsFF  		&sDequeuedAssetRequestsOther              	}; -	static LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Seconds> >	sResponseAssetRequestsTempTextureHTTP   ("assetresponsetimestemptexturehttp", +	static LLTrace::EventStatHandle<LLUnits::F64Seconds >	sResponseAssetRequestsTempTextureHTTP   ("assetresponsetimestemptexturehttp",  																							"Time spent responding to temporary texture asset http requests"),  													sResponseAssetRequestsTempTextureUDP    ("assetresponsetimestemptextureudp",   																							"Time spent responding to temporary texture asset udp requests"), @@ -250,7 +250,7 @@ namespace LLViewerAssetStatsFF  													sResponsedAssetRequestsOther            ("assetresponsetimesother",   																							"Time spent responding to other asset requests"); -	static LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Seconds> >* sResponse[EVACCount] = { +	static LLTrace::EventStatHandle<LLUnits::F64Seconds >* sResponse[EVACCount] = {  		&sResponseAssetRequestsTempTextureHTTP,     		&sResponseAssetRequestsTempTextureUDP,    		&sResponseAssetRequestsNonTempTextureHTTP, diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e8f68527e9..a8183e76b4 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -999,9 +999,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)  	// Time _can_ go backwards, for example if the user changes the system clock.  	// It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here.  //	llassert(time > gFrameTime); -	LLUnit<F64, LLUnits::Seconds> time_diff = time - gFrameTime; +	LLUnits::F64Seconds time_diff = time - gFrameTime;  	gFrameTime	= time; -	LLUnit<F64, LLUnits::Seconds> time_since_start = gFrameTime - gStartTime; +	LLUnits::F64Seconds time_since_start = gFrameTime - gStartTime;  	gFrameTimeSeconds = time_since_start;  	gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 8cb519b098..568d4b42ca 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -104,7 +104,7 @@ LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> >  							MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"),  							MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data"); -LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Seconds> >	 +LLTrace::CountStatHandle<LLUnits::F64Seconds >	  							SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"),  							SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"),  							LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%"); @@ -194,7 +194,7 @@ LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> >	REGION_CROSSING_TI  																REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"),  																RENDER_STACKTIME("renderstacktime", "RENDER_SECS"); -LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Seconds> >	AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), +LLTrace::EventStatHandle<LLUnits::F64Seconds >	AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"),  															TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"),  															MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"),  															FPS_10_TIME("fps10time", "Seconds below 10 FPS"), @@ -219,7 +219,7 @@ void LLViewerStats::resetStats()  	LLViewerStats::instance().mRecording.reset();  } -void LLViewerStats::updateFrameStats(const LLUnit<F64, LLUnits::Seconds> time_diff) +void LLViewerStats::updateFrameStats(const LLUnits::F64Seconds time_diff)  {  	if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0)  	{ @@ -299,13 +299,13 @@ F32		gAveLandCompression = 0.f,  		gWorstLandCompression = 0.f,   		gWorstWaterCompression = 0.f; -LLUnit<U32, LLUnits::Bytes>		gTotalWorldData = 0,  -								gTotalObjectData = 0,  -								gTotalTextureData = 0; +LLUnits::U32Bytes				gTotalWorldData,  +								gTotalObjectData,  +								gTotalTextureData;  U32								gSimPingCount = 0; -LLUnit<U32, LLUnits::Bits>		gObjectData = 0; +LLUnits::U32Bits				gObjectData;  F32		gAvgSimPing = 0.f; -LLUnit<U32, LLUnits::Bytes>		gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; +LLUnits::U32Bytes		gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {LLUnits::U32Bytes(0)};  extern U32  gVisCompared;  extern U32  gVisTested; @@ -345,8 +345,8 @@ void update_statistics()  	typedef LLInstanceTracker<LLTrace::TraceType<LLTrace::TimeBlockAccumulator>, std::string> trace_type_t; -	LLUnit<F64, LLUnits::Seconds> idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); -	LLUnit<F64, LLUnits::Seconds> network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); +	LLUnits::F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); +	LLUnits::F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network"));  	record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame")));  	record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs); @@ -364,7 +364,7 @@ void update_statistics()  	}  	else  	{ -		sample(LLStatViewer::SIM_PING, LLUnits::Seconds::fromValue(10)); +		sample(LLStatViewer::SIM_PING, LLUnits::U32Seconds(10));  	}  	if (LLViewerStats::instance().getRecording().getSum(LLStatViewer::FPS)) diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index b580606326..2cea575252 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -150,7 +150,7 @@ extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> >	ACTIVE_MESSAGE  																	MESSAGE_SYSTEM_DATA_IN,  																	MESSAGE_SYSTEM_DATA_OUT; -extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Seconds> >		SIM_20_FPS_TIME, +extern LLTrace::CountStatHandle<LLUnits::F64Seconds >		SIM_20_FPS_TIME,  																	SIM_PHYSICS_20_FPS_TIME,  																	LOSS_5_PERCENT_TIME; @@ -233,7 +233,7 @@ extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> >	REGION_CROS  														REBUILD_STACKTIME,  														RENDER_STACKTIME; -extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Seconds> >	AVATAR_EDIT_TIME, +extern LLTrace::EventStatHandle<LLUnits::F64Seconds >	AVATAR_EDIT_TIME,  																TOOLBOX_TIME,  																MOUSELOOK_TIME,  																FPS_10_TIME, @@ -254,7 +254,7 @@ public:  	LLViewerStats();  	~LLViewerStats(); -	void updateFrameStats(const LLUnit<F64, LLUnits::Seconds> time_diff); +	void updateFrameStats(const LLUnits::F64Seconds time_diff);  	void addToMessage(LLSD &body); @@ -370,7 +370,7 @@ public:  private:  	LLTrace::Recording				mRecording; -	LLUnit<F64, LLUnits::Seconds> mLastTimeDiff;  // used for time stat updates +	LLUnits::F64Seconds mLastTimeDiff;  // used for time stat updates  };  static const F32 SEND_STATS_PERIOD = 300.0f; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index eb8faacac2..c780814e50 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,8 +63,8 @@  ///////////////////////////////////////////////////////////////////////////////  // extern -const LLUnit<S32, LLUnits::Mibibytes> gMinVideoRam = 32; -const LLUnit<S32, LLUnits::Mibibytes> gMaxVideoRam = 512; +const LLUnit<S32, LLUnits::Mibibytes> gMinVideoRam(32); +const LLUnit<S32, LLUnits::Mibibytes> gMaxVideoRam(512);  // statics @@ -86,11 +86,11 @@ S32 LLViewerTexture::sAuxCount = 0;  LLFrameTimer LLViewerTexture::sEvaluationTimer;  F32 LLViewerTexture::sDesiredDiscardBias = 0.f;  F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sBoundTextureMemory = 0; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sTotalTextureMemory = 0; -LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxBoundTextureMem = 0; -LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxTotalTextureMem = 0; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sMaxDesiredTextureMem = 0 ; +LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sBoundTextureMemory; +LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sTotalTextureMemory; +LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxBoundTextureMem; +LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxTotalTextureMem; +LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sMaxDesiredTextureMem;  S8  LLViewerTexture::sCameraMovingDiscardBias = 0 ;  F32 LLViewerTexture::sCameraMovingBias = 0.0f ;  S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -530,10 +530,10 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity  		LLViewerMediaTexture::updateClass() ;  	} -	sBoundTextureMemory = LLImageGL::sBoundTextureMemory;//in bytes -	sTotalTextureMemory = LLImageGL::sGlobalTextureMemory;//in bytes -	sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem();//in MB	 -	sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem() ;//in MB +	sBoundTextureMemory = LLImageGL::sBoundTextureMemory; +	sTotalTextureMemory = LLImageGL::sGlobalTextureMemory; +	sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem(); +	sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem();  	sMaxDesiredTextureMem = sMaxTotalTextureMem ; //in Bytes, by default and when total used texture memory is small.  	if (sBoundTextureMemory >= sMaxBoundTextureMem || diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 63debe0464..2030b490e4 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1327,7 +1327,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)  	mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;  	if (mMaxResidentTexMemInMegaBytes > 640)  	{ -		mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes >> 2); +		mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4);  	}  	//system mem diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 5b6e927e32..673b55be69 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -101,8 +101,8 @@ public:  	void setUpdateStats(BOOL b)			{ mUpdateStats = b; } -	S32	getMaxResidentTexMem() const	{ return mMaxResidentTexMemInMegaBytes; } -	S32 getMaxTotalTextureMem() const   { return mMaxTotalTextureMemInMegaBytes;} +	LLUnit<S32, LLUnits::Mibibytes>	getMaxResidentTexMem() const	{ return mMaxResidentTexMemInMegaBytes; } +	LLUnit<S32, LLUnits::Mibibytes> getMaxTotalTextureMem() const   { return mMaxTotalTextureMemInMegaBytes;}  	S32 getNumImages()					{ return mImageList.size(); }  	void updateMaxResidentTexMem(S32 mem); @@ -200,8 +200,8 @@ private:  	BOOL mInitialized ;  	BOOL mUpdateStats; -	S32	mMaxResidentTexMemInMegaBytes; -	S32 mMaxTotalTextureMemInMegaBytes; +	LLUnit<S32, LLUnits::Mibibytes>	mMaxResidentTexMemInMegaBytes; +	LLUnit<S32, LLUnits::Mibibytes> mMaxTotalTextureMemInMegaBytes;  	LLFrameTimer mForceDecodeTimer;  private: diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 916dec86aa..22de7e150b 100755 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -48,8 +48,8 @@ const F32 MIN_FRACTIONAL = 0.2f;  const F32 MIN_BANDWIDTH = 50.f;  const F32 MAX_BANDWIDTH = 3000.f;  const F32 STEP_FRACTIONAL = 0.1f; -const LLUnit<F32, LLUnits::Percent> TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s -const LLUnit<F32, LLUnits::Percent> EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s +const LLUnit<F32, LLUnits::Percent> TIGHTEN_THROTTLE_THRESHOLD(3.0f); // packet loss % per s +const LLUnit<F32, LLUnits::Percent> EASE_THROTTLE_THRESHOLD(0.5f); // packet loss % per s  const F32 DYNAMIC_UPDATE_DURATION = 5.0f; // seconds  LLViewerThrottle gViewerThrottle; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 12b9744b24..66206fe53e 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -899,7 +899,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)  		if (mLastRegionHandle != 0)  		{  			++mRegionCrossingCount; -			LLUnit<F64, LLUnits::Seconds> delta = mRegionCrossingTimer.getElapsedTimeF32(); +			LLUnits::F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32());  			record(LLStatViewer::REGION_CROSSING_TIME, delta);  			// Diagnostics diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 5e8a771929..31b7e5a01c 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6547,7 +6547,7 @@ void LLVivoxVoiceClient::expireVoiceFonts()  	// Give a warning notification if any voice fonts are due to expire.  	if (will_expire)  	{ -		LLUnit<S32, LLUnits::Seconds> seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); +		LLUnit<S32, LLUnits::Seconds> seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime"));  		args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value());  		LLNotificationsUtil::add("VoiceEffectsWillExpire", args); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 7e4e80240d..38818e242b 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -717,7 +717,7 @@ void LLWorld::renderPropertyLines()  void LLWorld::updateNetStats()  { -	LLUnit<F64, LLUnits::Bits> bits = 0.f; +	LLUnits::F64Bits bits;  	U32 packets = 0;  	for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -735,8 +735,8 @@ void LLWorld::updateNetStats()  	S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut;  	S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; -	LLUnit<F64, LLUnits::Bits> actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); -	LLUnit<F64, LLUnits::Bits> actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); +	LLUnit<F64, LLUnits::Bits> actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); +	LLUnit<F64, LLUnits::Bits> actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits());  	add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits);  	add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); | 
