EXP-1880 WIP Update Media affects framerate even when Media is disabled.

meow-7.2.2
Richard Linden 2012-02-09 11:32:40 -08:00
parent bbdb390624
commit 41bc3eded9
2 changed files with 14 additions and 32 deletions

View File

@ -387,7 +387,6 @@ class LLViewerMediaMuteListObserver : public LLMuteListObserver
static LLViewerMediaMuteListObserver sViewerMediaMuteListObserver;
static bool sViewerMediaMuteListObserverInitialized = false;
static bool sInWorldMediaDisabled = false;
//////////////////////////////////////////////////////////////////////////////////////////
@ -652,20 +651,6 @@ void LLViewerMedia::muteListChanged()
}
}
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setInWorldMediaDisabled(bool disabled)
{
sInWorldMediaDisabled = disabled;
}
//////////////////////////////////////////////////////////////////////////////////////////
// static
bool LLViewerMedia::getInWorldMediaDisabled()
{
return sInWorldMediaDisabled;
}
//////////////////////////////////////////////////////////////////////////////////////////
// static
bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest)
@ -1568,7 +1553,6 @@ LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource()
bool LLViewerMedia::hasInWorldMedia()
{
if (sInWorldMediaDisabled) return false;
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
// This should be quick, because there should be very few non-in-world-media impls
@ -3107,15 +3091,6 @@ bool LLViewerMediaImpl::isForcedUnloaded() const
return true;
}
if(sInWorldMediaDisabled)
{
// When inworld media is disabled, all instances that aren't marked as "used in UI" will not be loaded.
if(!mUsedInUI)
{
return true;
}
}
// If this media's class is not supposed to be shown, unload
if (!shouldShowBasedOnClass())
{
@ -3783,12 +3758,22 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
// If it is attached to an avatar and the pref is off, we shouldn't show it
if (attached_to_another_avatar)
return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING);
{
static LLCachedControl<BOOL> show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING);
return show_media_on_others;
}
if (inside_parcel)
return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING);
{
static LLCachedControl<BOOL> show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING);
return show_media_within_parcel;
}
else
return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING);
{
static LLCachedControl<BOOL> show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING);
return show_media_outside_parcel;
}
}
//////////////////////////////////////////////////////////////////////////////////////////

View File

@ -112,9 +112,6 @@ public:
static F32 getVolume();
static void muteListChanged();
static void setInWorldMediaDisabled(bool disabled);
static bool getInWorldMediaDisabled();
static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest);
// Returns the priority-sorted list of all media impls.