From 29896d26c2ace6fb4db513c9d660e89168a736fc Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 3 Jun 2010 14:08:22 -0600 Subject: EXT-7630: FIXED: turn on http texture fetching by default. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/lltexturefetch.cpp | 7 ++++++- indra/newview/llviewerregion.cpp | 5 +++++ indra/newview/llviewerregion.h | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c0be54a105..6cebbb6bfc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3851,7 +3851,7 @@ Type Boolean Value - 0 + 1 InBandwidth diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index cf3bce2ec1..74b7f123d8 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -753,17 +753,22 @@ bool LLTextureFetchWorker::doWork(S32 param) if (region) { - std::string http_url = region->getCapability("GetTexture"); + std::string http_url = region->getHttpUrl() ; if (!http_url.empty()) { mUrl = http_url + "/?texture_id=" + mID.asString().c_str(); mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id. } + else + { + mCanUseHTTP = false ; + } } else { // This will happen if not logged in or if a region deoes not have HTTP Texture enabled //llwarns << "Region not found for host: " << mHost << llendl; + mCanUseHTTP = false; } } if (mCanUseHTTP && !mUrl.empty()) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c48668df9a..da240cedbb 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -216,6 +216,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mColoName("unknown"), mProductSKU("unknown"), mProductName("unknown"), + mHttpUrl(""), mCacheLoaded(FALSE), mCacheEntriesCount(0), mCacheID(), @@ -1555,6 +1556,10 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u else { mCapabilities[name] = url; + if(name == "GetTexture") + { + mHttpUrl = url ; + } } } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 5c4d5a61fd..a9e7ef771c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -291,6 +291,7 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion); /// implements LLCapabilityProvider virtual std::string getDescription() const; + std::string getHttpUrl() const { return mHttpUrl ;} LLSpatialPartition* getSpatialPartition(U32 type); public: @@ -383,6 +384,7 @@ private: std::string mColoName; std::string mProductSKU; std::string mProductName; + std::string mHttpUrl ; // Maps local ids to cache entries. -- cgit v1.2.3