From 1fbacbaa9ac002f7f5ae9a0a18ef985a8ec934c7 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 14:52:33 -0700 Subject: Partial implementation of LLFloaterNearbyMedia::refreshList(), with many TODO sections and a bit of ifdef-ed out pseudocode. Initial pass at LLViewerMediaImpl::getProximity(). Currently it just returns the position in the priority list, but that will change. --- indra/newview/llviewermedia.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index f9e09036a8..249b55d2ab 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -512,6 +512,7 @@ void LLViewerMedia::updateMedia() int impl_count_total = 0; int impl_count_interest_low = 0; int impl_count_interest_normal = 0; + int i = 0; #if 0 LL_DEBUGS("PluginPriority") << "Sorted impls:" << llendl; @@ -602,6 +603,17 @@ void LLViewerMedia::updateMedia() } pimpl->setPriority(new_priority); + + if(!pimpl->getUsedInUI()) + { + // Any impls used in the UI should not be in the proximity list. + pimpl->mProximity = -1; + } + else + { + // Other impls just get the same ordering as the priority list (for now). + pimpl->mProximity = i; + } #if 0 LL_DEBUGS("PluginPriority") << " " << pimpl @@ -614,6 +626,8 @@ void LLViewerMedia::updateMedia() #endif total_cpu += pimpl->getCPUUsage(); + + i++; } LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl; @@ -661,6 +675,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mPreviousMediaState(MEDIA_NONE), mPreviousMediaTime(0.0f), mIsDisabled(false), + mProximity(-1), mIsUpdated(false) { -- cgit v1.2.3