diff options
author | Anchor <none@none> | 2018-11-28 15:16:01 -0800 |
---|---|---|
committer | Anchor <none@none> | 2018-11-28 15:16:01 -0800 |
commit | 014480a79b765587881d0c0f707a7ee191f5fe2e (patch) | |
tree | 4d759c7b996065cccb9171a51a1a3f05d04b6e31 /indra/newview/llviewerregion.cpp | |
parent | 076719013ec2dab7bf8fd1f4d1f953ab73d594e9 (diff) | |
parent | 8558ce5c600b810356010ba3cd6d534ef22f4081 (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index dc23fa9d0c..18750f689a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -78,6 +78,7 @@ #include "llcoros.h" #include "lleventcoro.h" #include "llcorehttputil.h" +#include "llcallstack.h" #ifdef LL_WINDOWS #pragma warning(disable:4355) @@ -241,6 +242,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) LL_WARNS("AppInit", "Capabilities") << "Attempting to get capabilities for region that no longer exists!" << LL_ENDL; return; // this error condition is not recoverable. } + LL_DEBUGS("AppInit", "Capabilities") << "requesting seed caps for handle " << regionHandle + << " name " << regionp->getName() << LL_ENDL; std::string url = regionp->getCapability("Seed"); if (url.empty()) @@ -269,7 +272,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) buildCapabilityNames(capabilityNames); LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url - << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; + << " region name " << regionp->getName() + << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; regionp = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); @@ -323,6 +327,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) #endif regionp->setCapabilitiesReceived(true); + LL_DEBUGS("AppInit", "Capabilities") << "received caps for handle " << regionHandle + << " region name " << regionp->getName() << LL_ENDL; if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) { @@ -1259,7 +1265,7 @@ void LLViewerRegion::updateVisibleEntries(F32 max_time) LLPointer<LLViewerOctreeGroup> group = *group_iter; if(group->getNumRefs() < 3 || //group to be deleted !group->getOctreeNode() || group->isEmpty()) //group empty -{ + { continue; } @@ -2143,6 +2149,26 @@ void LLViewerRegion::getInfo(LLSD& info) info["Region"]["Handle"]["y"] = (LLSD::Integer)y; } +void LLViewerRegion::requestSimulatorFeatures() +{ + LL_DEBUGS("SimulatorFeatures") << "region " << getName() << " ptr " << this + << " trying to request SimulatorFeatures" << LL_ENDL; + // kick off a request for simulator features + std::string url = getCapability("SimulatorFeatures"); + if (!url.empty()) + { + std::string coroname = + LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", + boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, url, getHandle())); + + LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << LL_ENDL; + } + else + { + LL_WARNS("AppInit", "SimulatorFeatures") << "SimulatorFeatures cap not set" << LL_ENDL; + } +} + boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb) { return mSimulatorFeaturesReceivedSignal.connect(cb); @@ -2174,7 +2200,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) std::stringstream str; LLSDSerialize::toPrettyXML(sim_features, str); - LL_INFOS() << str.str() << LL_ENDL; + LL_INFOS() << "region " << getName() << " " << str.str() << LL_ENDL; mSimulatorFeatures = sim_features; setSimulatorFeaturesReceived(true); @@ -2220,7 +2246,7 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry) { LLViewerRegion* old_regionp = ((LLDrawable*)entry->getEntry()->getDrawable())->getRegion(); if(old_regionp != this && old_regionp) -{ + { LLViewerObject* obj = ((LLDrawable*)entry->getEntry()->getDrawable())->getVObj(); if(obj) { @@ -2383,12 +2409,18 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB // we've seen this object before if (entry->getCRC() == crc) { + LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL; + dumpStack("AnimatedObjectsStack"); + // Record a hit entry->recordDupe(); result = CACHE_UPDATE_DUPE; } else //CRC changed { + LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL; + dumpStack("AnimatedObjectsStack"); + // Update the cache entry entry->updateEntry(crc, dp); @@ -2399,6 +2431,9 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB } else { + LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL; + dumpStack("AnimatedObjectsStack"); + // we haven't seen this object before // Create new entry and add to map result = CACHE_UPDATE_ADDED; @@ -2503,7 +2538,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss // Record a hit mRegionCacheHitCount++; entry->recordHit(); - cache_miss_type = CACHE_MISS_TYPE_NONE; + cache_miss_type = CACHE_MISS_TYPE_NONE; entry->setUpdateFlags(flags); if(entry->isState(LLVOCacheEntry::ACTIVE)) @@ -2526,12 +2561,14 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss // LL_INFOS() << "CRC miss for " << local_id << LL_ENDL; addCacheMiss(local_id, CACHE_MISS_TYPE_CRC); + cache_miss_type = CACHE_MISS_TYPE_CRC; } } else { // LL_INFOS() << "Cache miss for " << local_id << LL_ENDL; addCacheMiss(local_id, CACHE_MISS_TYPE_FULL); + cache_miss_type = CACHE_MISS_TYPE_FULL; } return false; @@ -2568,6 +2605,9 @@ void LLViewerRegion::requestCacheMisses() msg->nextBlockFast(_PREHASH_ObjectData); msg->addU8Fast(_PREHASH_CacheMissType, (*iter).mType); msg->addU32Fast(_PREHASH_ID, (*iter).mID); + + LL_DEBUGS("AnimatedObjects") << "Requesting cache missed object " << (*iter).mID << LL_ENDL; + blocks++; if (blocks >= 255) @@ -2873,6 +2913,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("MeshUploadFlag"); capabilityNames.append("NavMeshGenerationStatus"); capabilityNames.append("NewFileAgentInventory"); + capabilityNames.append("ObjectAnimation"); capabilityNames.append("ObjectMedia"); capabilityNames.append("ObjectMediaNavigate"); capabilityNames.append("ObjectNavMeshProperties"); @@ -2967,12 +3008,8 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u } else if (name == "SimulatorFeatures") { - // kick off a request for simulator features - std::string coroname = - LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", - boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, url, getHandle())); - - LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << LL_ENDL; + mImpl->mCapabilities["SimulatorFeatures"] = url; + requestSimulatorFeatures(); } else { |