Backwards compatible usage of "ViewerAsset" cap for Textures and Mesh
This commit is contained in:
@@ -2584,7 +2584,8 @@ void LLMeshRepository::notifyLoadedMeshes()
|
|||||||
if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
|
if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
|
||||||
{
|
{
|
||||||
region_name = gAgent.getRegion()->getName();
|
region_name = gAgent.getRegion()->getName();
|
||||||
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh2");
|
const std::string mesh_cap(gAgent.getRegion()->getViewerAssetUrl());
|
||||||
|
mGetMeshCapability = !mesh_cap.empty() ? mesh_cap : gAgent.getRegion()->getCapability("GetMesh2");
|
||||||
if (mGetMeshCapability.empty())
|
if (mGetMeshCapability.empty())
|
||||||
{
|
{
|
||||||
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
|
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
|
||||||
|
|||||||
@@ -1241,7 +1241,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||||||
|
|
||||||
if (region)
|
if (region)
|
||||||
{
|
{
|
||||||
std::string http_url = region->getHttpUrl() ;
|
std::string http_url = region->getViewerAssetUrl();
|
||||||
|
if (http_url.empty()) http_url = region->getCapability("GetTexture");
|
||||||
if (!http_url.empty())
|
if (!http_url.empty())
|
||||||
{
|
{
|
||||||
if (mFTType != FTT_DEFAULT)
|
if (mFTType != FTT_DEFAULT)
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||||||
mColoName("unknown"),
|
mColoName("unknown"),
|
||||||
mProductSKU("unknown"),
|
mProductSKU("unknown"),
|
||||||
mProductName("unknown"),
|
mProductName("unknown"),
|
||||||
mHttpUrl(""),
|
mViewerAssetUrl(""),
|
||||||
mCacheLoaded(FALSE),
|
mCacheLoaded(FALSE),
|
||||||
mCacheDirty(FALSE),
|
mCacheDirty(FALSE),
|
||||||
mReleaseNotesRequested(FALSE),
|
mReleaseNotesRequested(FALSE),
|
||||||
@@ -1957,6 +1957,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
|
|||||||
capabilityNames.append("UpdateScriptAgent");
|
capabilityNames.append("UpdateScriptAgent");
|
||||||
capabilityNames.append("UpdateScriptTask");
|
capabilityNames.append("UpdateScriptTask");
|
||||||
capabilityNames.append("UploadBakedTexture");
|
capabilityNames.append("UploadBakedTexture");
|
||||||
|
capabilityNames.append("ViewerAsset");
|
||||||
capabilityNames.append("ViewerMetrics");
|
capabilityNames.append("ViewerMetrics");
|
||||||
capabilityNames.append("ViewerStartAuction");
|
capabilityNames.append("ViewerStartAuction");
|
||||||
capabilityNames.append("ViewerStats");
|
capabilityNames.append("ViewerStats");
|
||||||
@@ -2126,9 +2127,20 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
mImpl->mCapabilities[name] = url;
|
mImpl->mCapabilities[name] = url;
|
||||||
if(name == "GetTexture")
|
if(name == "ViewerAsset")
|
||||||
{
|
{
|
||||||
mHttpUrl = url ;
|
/*==============================================================*/
|
||||||
|
// The following inserted lines are a hack for testing MAINT-7081,
|
||||||
|
// which is why the indentation and formatting are left ugly.
|
||||||
|
const char* VIEWERASSET = getenv("VIEWERASSET");
|
||||||
|
if (VIEWERASSET)
|
||||||
|
{
|
||||||
|
mImpl->mCapabilities[name] = VIEWERASSET;
|
||||||
|
mViewerAssetUrl = VIEWERASSET;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
/*==============================================================*/
|
||||||
|
mViewerAssetUrl = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2139,9 +2151,20 @@ void LLViewerRegion::setCapabilityDebug(const std::string& name, const std::stri
|
|||||||
if ( ! ( name == "EventQueueGet" || name == "UntrustedSimulatorMessage" || name == "SimulatorFeatures" ) )
|
if ( ! ( name == "EventQueueGet" || name == "UntrustedSimulatorMessage" || name == "SimulatorFeatures" ) )
|
||||||
{
|
{
|
||||||
mImpl->mSecondCapabilitiesTracker[name] = url;
|
mImpl->mSecondCapabilitiesTracker[name] = url;
|
||||||
if(name == "GetTexture")
|
if(name == "ViewerAsset")
|
||||||
{
|
{
|
||||||
mHttpUrl = url ;
|
/*==============================================================*/
|
||||||
|
// The following inserted lines are a hack for testing MAINT-7081,
|
||||||
|
// which is why the indentation and formatting are left ugly.
|
||||||
|
const char* VIEWERASSET = getenv("VIEWERASSET");
|
||||||
|
if (VIEWERASSET)
|
||||||
|
{
|
||||||
|
mImpl->mSecondCapabilitiesTracker[name] = VIEWERASSET;
|
||||||
|
mViewerAssetUrl = VIEWERASSET;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
/*==============================================================*/
|
||||||
|
mViewerAssetUrl = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ public:
|
|||||||
friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion);
|
friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion);
|
||||||
/// implements LLCapabilityProvider
|
/// implements LLCapabilityProvider
|
||||||
virtual std::string getDescription() const;
|
virtual std::string getDescription() const;
|
||||||
std::string getHttpUrl() const { return mHttpUrl ;}
|
std::string getViewerAssetUrl() const { return mViewerAssetUrl; }
|
||||||
|
|
||||||
LLSpatialPartition* getSpatialPartition(U32 type);
|
LLSpatialPartition* getSpatialPartition(U32 type);
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ private:
|
|||||||
std::string mColoName;
|
std::string mColoName;
|
||||||
std::string mProductSKU;
|
std::string mProductSKU;
|
||||||
std::string mProductName;
|
std::string mProductName;
|
||||||
std::string mHttpUrl;
|
std::string mViewerAssetUrl;
|
||||||
|
|
||||||
// Maps local ids to cache entries.
|
// Maps local ids to cache entries.
|
||||||
// Regions can have order 10,000 objects, so assume
|
// Regions can have order 10,000 objects, so assume
|
||||||
|
|||||||
Reference in New Issue
Block a user