diff options
| author | simon-linden <57500096+simon-linden@users.noreply.github.com> | 2023-05-12 20:21:28 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-12 20:21:28 -0700 | 
| commit | 74ed32837ba29f360e113172044495e8213617a1 (patch) | |
| tree | 0f594c5fd7985baebc8acd3f52893e1675b57375 /indra/newview/llagent.cpp | |
| parent | a9c64940cbac27328b6304f9d63cdf4265fae2f7 (diff) | |
| parent | 81f1be67109885f98f649974022aa6d444dd633d (diff) | |
Merge pull request #211 from secondlife/sl-19676-loading-stats
sl-19676 - more loading stats and 360 Interest List mode work
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 82 | 
1 files changed, 56 insertions, 26 deletions
| diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8cc9be7244..307f73fab4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -401,6 +401,7 @@ LLAgent::LLAgent() :  	mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),  	mTeleportState(TELEPORT_NONE),  	mRegionp(NULL), +    mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT),  	mAgentOriginGlobal(),  	mPositionGlobal(), @@ -894,11 +895,19 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal  // static  void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion *regionp) -{ -    if (regionp && regionp->getRegionID() == region_id) +{	// Changed regions and now have the region capabilities +    if (regionp)      { -        regionp->requestSimulatorFeatures(); -        LLAppViewer::instance()->updateNameLookupUrl(regionp); +        if (regionp->getRegionID() == region_id) +        { +            regionp->requestSimulatorFeatures(); +            LLAppViewer::instance()->updateNameLookupUrl(regionp); +        } + +        if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) +        { +            gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); +        }      }  } @@ -2910,39 +2919,60 @@ void LLAgent::processMaturityPreferenceFromServer(const LLSD &result, U8 perferr      handlePreferredMaturityResult(maturity);  } - -bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess, httpCallback_t cbFailure) -{ -    if (!getRegion()) +// Using a new capability, tell the simulator that we want it to send everything +// it knows about and not just what is in front of the camera, in its view +// frustum. We need this feature so that the contents of the region that appears +// in the 6 snapshots which we cannot see and is normally not "considered", is +// also rendered. Typically, this is turned on when the 360 capture floater is +// opened and turned off when it is closed. +// Note: for this version, we do not have a way to determine when "everything" +// has arrived and has been rendered so for now, the proposal is that users +// will need to experiment with the low resolution version and wait for some +// (hopefully) small period of time while the full contents resolves. +// Pass in a flag to ask the simulator/interest list to "send everything" or +// not (the default mode) +void LLAgent::changeInterestListMode(const std::string &new_mode) +{ +    if (new_mode != mInterestListMode)      { -        return false; +        mInterestListMode = new_mode; + +        // Change interest list mode for all regions.  If they are already set for the current mode, +        // the setting will have no effect. +        for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); +             iter != LLWorld::getInstance()->getRegionList().end(); +             ++iter) +        { +            LLViewerRegion *regionp = *iter; +            if (regionp && regionp->isAlive() && regionp->capabilitiesReceived()) +            { +                regionp->setInterestListMode(mInterestListMode); +            } +        }      } -    std::string url = getRegion()->getCapability(capName); +	else +	{ +		LL_DEBUGS("360Capture") << "Agent interest list mode is already set to " << mInterestListMode << LL_ENDL; +	} +} + -    if (url.empty()) +bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess, httpCallback_t cbFailure) +{ +    if (getRegion())      { -        LL_WARNS("Agent") << "Could not retrieve region capability \"" << capName << "\"" << LL_ENDL; -        return false; +        return getRegion()->requestPostCapability(capName, postData, cbSuccess, cbFailure);      } - -    LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, mHttpPolicy, postData, cbSuccess, cbFailure); -    return true; +	return false;  }  bool LLAgent::requestGetCapability(const std::string &capName, httpCallback_t cbSuccess, httpCallback_t cbFailure)  { -    std::string url; - -    url = getRegionCapability(capName); - -    if (url.empty()) +    if (getRegion())      { -        LL_WARNS("Agent") << "Could not retrieve region capability \"" << capName << "\"" << LL_ENDL; -        return false; +        return getRegion()->requestGetCapability(capName, cbSuccess, cbFailure);      } - -    LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpGet(url, mHttpPolicy, cbSuccess, cbFailure); -    return true; +    return false;  }  BOOL LLAgent::getAdminOverride() const	 | 
