summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp48
1 files changed, 39 insertions, 9 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 5b61eab5f7..efaa327af6 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)
@@ -1252,7 +1253,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;
}
@@ -2136,6 +2137,24 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
+void LLViewerRegion::requestSimulatorFeatures()
+{
+ // 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);
@@ -2213,7 +2232,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)
{
@@ -2376,12 +2395,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);
@@ -2392,6 +2417,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;
@@ -2496,7 +2524,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))
@@ -2519,12 +2547,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;
@@ -2561,6 +2591,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)
@@ -2861,6 +2894,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");
@@ -2954,12 +2988,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
{