Automated merge with ssh://rick@hg.lindenlab.com/skolb/media
commit
5b6e4577ae
|
|
@ -402,7 +402,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue
|
|||
LLMediaDataClient::request_queue_t::const_iterator end = q.end();
|
||||
while (iter != end)
|
||||
{
|
||||
s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString();
|
||||
s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString() << "(" << (*iter)->getObject()->getMediaInterest() << ")";
|
||||
iter++;
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1243,8 +1243,6 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Does this face have media?
|
||||
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
|
||||
if(!tep)
|
||||
|
|
@ -1257,11 +1255,11 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
|
|||
|
||||
viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL;
|
||||
|
||||
if (gSavedSettings.getBOOL("MediaOnAPrimUI")
|
||||
&& media_impl.notNull())
|
||||
if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
|
||||
{
|
||||
if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) )
|
||||
if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
|
||||
{
|
||||
// It's okay to give this a null impl
|
||||
LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -558,6 +558,20 @@ bool LLViewerMedia::getInWorldMediaDisabled()
|
|||
return sInWorldMediaDisabled;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest)
|
||||
{
|
||||
if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
// XXX HACK
|
||||
return object_interest > 1023;// INTEREST_THRESHHOLD;
|
||||
}
|
||||
}
|
||||
|
||||
LLViewerMedia::impl_list &LLViewerMedia::getPriorityList()
|
||||
{
|
||||
return sViewerMediaImplList;
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ class LLViewerMedia
|
|||
static void setInWorldMediaDisabled(bool disabled);
|
||||
static bool getInWorldMediaDisabled();
|
||||
|
||||
static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest);
|
||||
|
||||
// Returns the priority-sorted list of all media impls.
|
||||
static impl_list &getPriorityList();
|
||||
|
||||
|
|
|
|||
|
|
@ -144,9 +144,19 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
|
|||
}
|
||||
|
||||
mFocusedImplID = LLUUID::null;
|
||||
mFocusedObjectID = LLUUID::null;
|
||||
mFocusedObjectFace = 0;
|
||||
if (objectp.notNull())
|
||||
{
|
||||
// Still record the focused object...it may mean we need to load media data.
|
||||
// This will aid us in determining this object is "important enough"
|
||||
mFocusedObjectID = objectp->getID();
|
||||
mFocusedObjectFace = face;
|
||||
}
|
||||
else {
|
||||
mFocusedObjectID = LLUUID::null;
|
||||
mFocusedObjectFace = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLViewerMediaFocus::clearFocus()
|
||||
|
|
@ -336,7 +346,7 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
|
||||
void LLViewerMediaFocus::update()
|
||||
{
|
||||
if(mFocusedImplID.notNull() || mFocusedObjectID.notNull())
|
||||
if(mFocusedImplID.notNull())
|
||||
{
|
||||
// We have a focused impl/face.
|
||||
if(!getFocus())
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
#include "llmediaentry.h"
|
||||
#include "llmediadataclient.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewermediafocus.h"
|
||||
|
||||
const S32 MIN_QUIET_FRAMES_COALESCE = 30;
|
||||
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
|
||||
|
|
@ -138,8 +139,7 @@ public:
|
|||
}
|
||||
virtual bool isInterestingEnough() const
|
||||
{
|
||||
// TODO: use performance manager to control this
|
||||
return true;
|
||||
return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest());
|
||||
}
|
||||
|
||||
virtual std::string getCapabilityUrl(const std::string &name) const
|
||||
|
|
@ -2089,6 +2089,9 @@ viewer_media_t LLVOVolume::getMediaImpl(U8 face_id) const
|
|||
|
||||
F64 LLVOVolume::getTotalMediaInterest() const
|
||||
{
|
||||
if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == getID())
|
||||
return F64_MAX;
|
||||
|
||||
F64 interest = (F64)-1.0; // means not interested;
|
||||
int i = 0;
|
||||
const int end = getNumTEs();
|
||||
|
|
|
|||
Loading…
Reference in New Issue