diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
| -rw-r--r-- | indra/newview/llfloaterurlentry.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 178 | ||||
| -rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.h | 21 | ||||
| -rw-r--r-- | indra/newview/llparticipantlist.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/lltexturefetch.cpp | 42 | ||||
| -rw-r--r-- | indra/newview/lltexturefetch.h | 4 | ||||
| -rw-r--r-- | indra/newview/llviewerinventory.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.h | 4 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 28 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 2 | 
12 files changed, 211 insertions, 116 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8c188461b2..17b58eab47 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1652,6 +1652,17 @@        <key>Value</key>        <string />      </map> +	<key>DebugAvatarRezTime</key> +	<map> +		<key>Comment</key> +		<string>Display times for avatars to resolve.</string> +		<key>Persist</key> +		<integer>1</integer> +		<key>Type</key> +		<string>Boolean</string> +		<key>Value</key> +		<integer>0</integer> +	</map>      <key>DebugBeaconLineWidth</key>      <map>        <key>Comment</key> diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 002d417e4c..0e802e9736 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -70,11 +70,6 @@ public:  		  completeAny(status, mime_type);  	  } -	  virtual void error( U32 status, const std::string& reason ) -	  { -		  completeAny(status, LLMIMETypes::getDefaultMimeType()); -	  } -  	  void completeAny(U32 status, const std::string& mime_type)  	  {  		  // Set empty type to none/none.  Empty string is reserved for legacy parcels diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index cfbc2c3e05..0ff6ab2644 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -46,26 +46,11 @@  const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f;  const S32 MAX_FETCH_RETRIES = 10; -// RN: for some reason, using std::queue in the header file confuses the compiler which thinks it's an xmlrpc_queue -static std::deque<LLUUID> sFetchQueue; -bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) -{ -	for (std::deque<LLUUID>::iterator it = sFetchQueue.begin(); -		 it != sFetchQueue.end(); ++it) -	{ -		const LLUUID& fetch_id = *it; -		if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) -			return false; -	} -	return true; -} - -  LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() :  	mBackgroundFetchActive(FALSE),  	mAllFoldersFetched(FALSE), -	mInventoryFetchStarted(FALSE), -	mLibraryFetchStarted(FALSE), +	mRecursiveInventoryFetchStarted(FALSE), +	mRecursiveLibraryFetchStarted(FALSE),  	mNumFetchRetries(0),  	mMinTimeBetweenFetches(0.3f),  	mMaxTimeBetweenFetches(10.f), @@ -80,12 +65,12 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()  bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete()  { -	return sFetchQueue.empty() && mBulkFetchCount<=0; +	return mFetchQueue.empty() && mBulkFetchCount<=0;  }  bool LLInventoryModelBackgroundFetch::libraryFetchStarted()  { -	return mLibraryFetchStarted; +	return mRecursiveLibraryFetchStarted;  }  bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() @@ -100,7 +85,7 @@ bool LLInventoryModelBackgroundFetch::libraryFetchInProgress()  bool LLInventoryModelBackgroundFetch::inventoryFetchStarted()  { -	return mInventoryFetchStarted; +	return mRecursiveInventoryFetchStarted;  }  bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() @@ -123,41 +108,41 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive()  	return mBackgroundFetchActive;  } -void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) +void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive)  {  	if (!mAllFoldersFetched)  	{  		mBackgroundFetchActive = TRUE;  		if (cat_id.isNull())  		{ -			if (!mInventoryFetchStarted) +			if (!mRecursiveInventoryFetchStarted)  			{ -				mInventoryFetchStarted = TRUE; -				sFetchQueue.push_back(gInventory.getRootFolderID()); +				mRecursiveInventoryFetchStarted |= recursive; +				mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive));  				gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);  			} -			if (!mLibraryFetchStarted) +			if (!mRecursiveLibraryFetchStarted)  			{ -				mLibraryFetchStarted = TRUE; -				sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); +				mRecursiveLibraryFetchStarted |= recursive; +				mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive));  				gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);  			}  		}  		else  		{  			// specific folder requests go to front of queue -			if (sFetchQueue.empty() || sFetchQueue.front() != cat_id) +			if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id)  			{ -				sFetchQueue.push_front(cat_id); +				mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive));  				gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);  			}  			if (cat_id == gInventory.getLibraryRootFolderID())  			{ -				mLibraryFetchStarted = TRUE; +				mRecursiveLibraryFetchStarted |= recursive;  			}  			if (cat_id == gInventory.getRootFolderID())  			{ -				mInventoryFetchStarted = TRUE; +				mRecursiveInventoryFetchStarted |= recursive;  			}  		}  	} @@ -166,7 +151,7 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id)  void LLInventoryModelBackgroundFetch::findLostItems()  {  	mBackgroundFetchActive = TRUE; -    sFetchQueue.push_back(LLUUID::null); +    mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE));      gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);  } @@ -183,8 +168,8 @@ void LLInventoryModelBackgroundFetch::stopBackgroundFetch()  void LLInventoryModelBackgroundFetch::setAllFoldersFetched()  { -	if (mInventoryFetchStarted && -		mLibraryFetchStarted) +	if (mRecursiveInventoryFetchStarted && +		mRecursiveLibraryFetchStarted)  	{  		mAllFoldersFetched = TRUE;  	} @@ -210,7 +195,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  		//DEPRECATED OLD CODE FOLLOWS.  		// no more categories to fetch, stop fetch process -		if (sFetchQueue.empty()) +		if (mFetchQueue.empty())  		{  			llinfos << "Inventory fetch completed" << llendl; @@ -232,7 +217,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  		while(1)  		{ -			if (sFetchQueue.empty()) +			if (mFetchQueue.empty())  			{  				break;  			} @@ -243,12 +228,13 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  				break;  			} -			LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); +			const FetchQueueInfo info = mFetchQueue.front(); +			LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID);  			// category has been deleted, remove from queue.  			if (!cat)  			{ -				sFetchQueue.pop_front(); +				mFetchQueue.pop_front();  				continue;  			} @@ -271,10 +257,10 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  				}  			}  			// do I have all my children? -			else if (gInventory.isCategoryComplete(sFetchQueue.front())) +			else if (gInventory.isCategoryComplete(info.mCatUUID))  			{  				// finished with this category, remove from queue -				sFetchQueue.pop_front(); +				mFetchQueue.pop_front();  				// add all children to queue  				LLInventoryModel::cat_array_t* categories; @@ -284,7 +270,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  					 it != categories->end();  					 ++it)  				{ -					sFetchQueue.push_back((*it)->getUUID()); +					mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive));  				}  				// we received a response in less than the fast time @@ -303,13 +289,12 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()  			{  				// received first packet, but our num descendants does not match db's num descendants  				// so try again later -				LLUUID fetch_id = sFetchQueue.front(); -				sFetchQueue.pop_front(); +				mFetchQueue.pop_front();  				if (mNumFetchRetries++ < MAX_FETCH_RETRIES)  				{  					// push on back of queue -					sFetchQueue.push_back(fetch_id); +					mFetchQueue.push_back(info);  				}  				mTimelyFetchPending = FALSE;  				mFetchTimer.reset(); @@ -334,20 +319,25 @@ void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching)  class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder  { -	public: -		LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; -		//LLInventoryModelFetchDescendentsResponder() {}; -		void result(const LLSD& content); -		void error(U32 status, const std::string& reason); -	public: -		typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; -	protected: -		LLSD mRequestSD; +public: +	LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd, uuid_vec_t recursive_cats) :  +		mRequestSD(request_sd), +		mRecursiveCatUUIDs(recursive_cats) +	{}; +	//LLInventoryModelFetchDescendentsResponder() {}; +	void result(const LLSD& content); +	void error(U32 status, const std::string& reason); +protected: +	BOOL getIsRecursive(const LLUUID& cat_id) const; +private: +	LLSD mRequestSD; +	uuid_vec_t mRecursiveCatUUIDs; // Hack for storing away which cat fetches are recursive.  };  //If we get back a normal response, handle it here -void  LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) +void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)  { +	LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();  	if (content.has("folders"))	  	{ @@ -412,11 +402,12 @@ void  LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)  			{	  				LLSD category = *category_it;  				tcategory->fromLLSD(category);  -							 -				if (LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted() || -					LLInventoryModelBackgroundFetch::instance().libraryFetchStarted()) +				 +				const BOOL recursive = getIsRecursive(tcategory->getUUID()); +				 +				if (recursive)  				{ -					sFetchQueue.push_back(tcategory->getUUID()); +					fetcher->mFetchQueue.push_back(LLInventoryModelBackgroundFetch::FetchQueueInfo(tcategory->getUUID(), recursive));  				}  				else if ( !gInventory.isCategoryComplete(tcategory->getUUID()) )  				{ @@ -461,12 +452,12 @@ void  LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)  		}  	} -	LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); +	fetcher->incrBulkFetch(-1); -	if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) +	if (fetcher->isBulkFetchProcessingComplete())  	{  		llinfos << "Inventory fetch completed" << llendl; -		LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); +		fetcher->setAllFoldersFetched();  	}  	gInventory.notifyObservers("fetchDescendents"); @@ -475,12 +466,14 @@ void  LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)  //If we get back an error (not found, etc...), handle it here  void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason)  { +	LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); +  	llinfos << "LLInventoryModelFetchDescendentsResponder::error "  		<< status << ": " << reason << llendl; -	LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); +	fetcher->incrBulkFetch(-1); -	if (status==499)		//timed out.  Let's be awesome! +	if (status==499) // Timed out.  	{  		for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();  			folder_it != mRequestSD["folders"].endArray(); @@ -488,24 +481,30 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str  		{	  			LLSD folder_sd = *folder_it;  			LLUUID folder_id = folder_sd["folder_id"]; -			sFetchQueue.push_front(folder_id); +			const BOOL recursive = getIsRecursive(folder_id); +			fetcher->mFetchQueue.push_front(LLInventoryModelBackgroundFetch::FetchQueueInfo(folder_id, recursive));  		}  	}  	else  	{ -		if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) +		if (fetcher->isBulkFetchProcessingComplete())  		{ -			LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); +			fetcher->setAllFoldersFetched();  		}  	}  	gInventory.notifyObservers("fetchDescendents");  } +BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat_id) const +{ +	return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end()); +} +  //static   Bundle up a bunch of requests to send all at once.  void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  {  	//Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. -	//If there are items in sFetchQueue, we want to check the time since the last bulkFetch was  +	//If there are items in mFetchQueue, we want to check the time since the last bulkFetch was   	//sent.  If it exceeds our retry time, go ahead and fire off another batch.    	//Stopbackgroundfetch will be run from the Responder instead of here.   @@ -528,11 +527,16 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  	U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1; +	uuid_vec_t recursive_cats; +  	LLSD body;  	LLSD body_lib; -	while (!(sFetchQueue.empty()) && (folder_count < max_batch_size)) + +	while (!(mFetchQueue.empty()) && (folder_count < max_batch_size))  	{ -        if (sFetchQueue.front().isNull()) //DEV-17797 +		const FetchQueueInfo& fetch_info = mFetchQueue.front(); +		const LLUUID &cat_id = fetch_info.mCatUUID; +        if (cat_id.isNull()) //DEV-17797          {  			LLSD folder_sd;  			folder_sd["folder_id"]		= LLUUID::null.asString(); @@ -545,7 +549,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)          }          else          { -		    LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); +		    const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);  		    if (cat)  		    { @@ -564,9 +568,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  					    body["folders"].append(folder_sd);  				    folder_count++;  			    } -			    if (mInventoryFetchStarted || mLibraryFetchStarted) -			    {	//Already have this folder but append child folders to list. -				    // add all children to queue +				// May already have this folder, but append child folders to list. +			    if (fetch_info.mRecursive) +			    {	  					LLInventoryModel::cat_array_t* categories;  					LLInventoryModel::item_array_t* items;  					gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); @@ -574,12 +578,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  						 it != categories->end();  						 ++it)  					{ -						sFetchQueue.push_back((*it)->getUUID()); +						mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive));  				    }  			    }  		    }          } -		sFetchQueue.pop_front(); +		if (fetch_info.mRecursive) +			recursive_cats.push_back(cat_id); + +		mFetchQueue.pop_front();  	}  	if (folder_count > 0) @@ -587,12 +594,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  		mBulkFetchCount++;  		if (body["folders"].size())  		{ -			LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); +			LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); +			LLHTTPClient::post(url, body, fetcher, 300.0);  		}  		if (body_lib["folders"].size())  		{  			std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); -			LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); +			 +			LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); +			LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0);  		}  		mFetchTimer.reset();  	} @@ -601,3 +611,17 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)  		setAllFoldersFetched();  	}  } + +bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const +{ +	for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); +		 it != mFetchQueue.end(); ++it) +	{ +		const LLUUID& fetch_id = (*it).mCatUUID; +		if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) +			return false; +	} +	return true; +} + + diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 94606fae23..c1e37eda8f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -68,13 +68,15 @@ class LLInventoryCollectFunctor;  class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch>  { +	friend class LLInventoryModelFetchDescendentsResponder; +  public:  	LLInventoryModelBackgroundFetch();  	~LLInventoryModelBackgroundFetch();  	// Start and stop background breadth-first fetching of inventory contents.  	// This gets triggered when performing a filter-search -	void start(const LLUUID& cat_id = LLUUID::null); +	void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE);  	BOOL backgroundFetchActive();  	bool isEverythingFetched();  	void incrBulkFetch(S16 fetching); @@ -98,9 +100,20 @@ public:  	static void backgroundFetchCB(void*); // background fetch idle function  	void backgroundFetch(); +	struct FetchQueueInfo +	{ +		FetchQueueInfo(const LLUUID& id, BOOL recursive) : +			mCatUUID(id), mRecursive(recursive) +		{ +		} +		LLUUID mCatUUID; +		BOOL mRecursive; +	}; +protected: +	bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const;  private: - 	BOOL mInventoryFetchStarted; -	BOOL mLibraryFetchStarted; + 	BOOL mRecursiveInventoryFetchStarted; +	BOOL mRecursiveLibraryFetchStarted;  	BOOL mAllFoldersFetched;  	// completing the fetch once per session should be sufficient @@ -113,6 +126,8 @@ private:  	F32 mMinTimeBetweenFetches;  	F32 mMaxTimeBetweenFetches; +	typedef std::deque<FetchQueueInfo> fetch_queue_t; +	fetch_queue_t mFetchQueue;  };  #endif // LL_LLINVENTORYMODELBACKGROUNDFETCH_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index a058548459..8c908449a0 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -719,8 +719,10 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata,  	{  		return;  	} +	LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)); +	if (NULL == item) return; -	name = speakerp->mDisplayName; +	name = item->getAvatarName();  	LLMute::EType mute_type;  	switch (speakerp->mType) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 3d447dd411..7fa04ce574 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -166,6 +166,9 @@ public:  		mGetReason = reason;  	} +	void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} +	bool getCanUseHTTP()const {return mCanUseHTTP ;} +  protected:  	LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host,  						 F32 priority, S32 discard, S32 size); @@ -247,15 +250,16 @@ private:  	S32 mRequestedSize;  	S32 mDesiredSize;  	S32 mFileSize; -	S32 mCachedSize; -	BOOL mLoaded; +	S32 mCachedSize;	  	e_request_state mSentRequest;  	handle_t mDecodeHandle; +	BOOL mLoaded;  	BOOL mDecoded;  	BOOL mWritten;  	BOOL mNeedsAux;  	BOOL mHaveAllData;  	BOOL mInLocalCache; +	bool mCanUseHTTP ;  	S32 mHTTPFailCount;  	S32 mRetryAttempt;  	S32 mActiveCount; @@ -411,6 +415,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,  	  mNeedsAux(FALSE),  	  mHaveAllData(FALSE),  	  mInLocalCache(FALSE), +	  mCanUseHTTP(true),  	  mHTTPFailCount(0),  	  mRetryAttempt(0),  	  mActiveCount(0), @@ -640,11 +645,12 @@ bool LLTextureFetchWorker::doWork(S32 param)  				return false;  			}  			mFileSize = 0; -			mLoaded = FALSE; -			setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it +			mLoaded = FALSE;			  			if (mUrl.compare(0, 7, "file://") == 0)  			{ +				setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it +  				// read file from local disk  				std::string filename = mUrl.substr(7, std::string::npos);  				CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); @@ -653,11 +659,13 @@ bool LLTextureFetchWorker::doWork(S32 param)  			}  			else if (mUrl.empty())  			{ +				setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it +  				CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);  				mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority,  																		  offset, size, responder);  			} -			else +			else if(mCanUseHTTP)  			{  				if (!(mUrl.compare(0, 7, "http://") == 0))  				{ @@ -667,6 +675,11 @@ bool LLTextureFetchWorker::doWork(S32 param)  				setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);  				mState = SEND_HTTP_REQ;  			} +			else +			{ +				setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); +				mState = LOAD_FROM_NETWORK; +			}  		}  		if (mLoaded) @@ -727,7 +740,7 @@ bool LLTextureFetchWorker::doWork(S32 param)  		static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP");  // 		if (mHost != LLHost::invalid) get_url = false; -		if ( use_http && mUrl.empty())//get http url. +		if ( use_http && mCanUseHTTP && mUrl.empty())//get http url.  		{  			LLViewerRegion* region = NULL;  			if (mHost == LLHost::invalid) @@ -750,7 +763,7 @@ bool LLTextureFetchWorker::doWork(S32 param)  				//llwarns << "Region not found for host: " << mHost << llendl;  			}  		} -		if (!mUrl.empty()) +		if (mCanUseHTTP && !mUrl.empty())  		{  			mState = LLTextureFetchWorker::SEND_HTTP_REQ;  			setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); @@ -891,7 +904,13 @@ bool LLTextureFetchWorker::doWork(S32 param)  				if (mGetStatus == HTTP_NOT_FOUND)  				{  					mHTTPFailCount = max_attempts = 1; // Don't retry -					llinfos << "Texture missing from server (404): " << mUrl << llendl; +					//llinfos << "Texture missing from server (404): " << mUrl << llendl; + +					//roll back to try UDP +					mState = INIT ; +					mCanUseHTTP = false ; +					setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); +					return false ;  				}  				else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE)  				{ @@ -1471,7 +1490,7 @@ LLTextureFetch::~LLTextureFetch()  }  bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, -								   S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) +								   S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http)  {  	if (mDebugPause)  	{ @@ -1533,6 +1552,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con  		worker->mNeedsAux = needs_aux;  		worker->setImagePriority(priority);  		worker->setDesiredDiscard(desired_discard, desired_size); +		worker->setCanUseHTTP(can_use_http) ;  		if (!worker->haveWork())  		{  			worker->mState = LLTextureFetchWorker::INIT; @@ -1555,6 +1575,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con  		worker->lockWorkMutex();  		worker->mActiveCount++;  		worker->mNeedsAux = needs_aux; +		worker->setCanUseHTTP(can_use_http) ;  		worker->unlockWorkMutex();  	} @@ -2215,7 +2236,7 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id)  }  S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& requested_priority_p, -								  U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p) +								  U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http)  {  	S32 state = LLTextureFetchWorker::INVALID;  	F32 data_progress = 0.0f; @@ -2253,6 +2274,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r  			requested_priority = worker->mImagePriority;  		}  		fetch_priority = worker->getPriority(); +		can_use_http = worker->getCanUseHTTP() ;  		worker->unlockWorkMutex();  	}  	data_progress_p = data_progress; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index ef2ec520bf..634e590fe0 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -62,7 +62,7 @@ public:  	void shutDownImageDecodeThread() ;  //called in the main thread after the ImageDecodeThread shuts down.  	bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, -					   S32 w, S32 h, S32 c, S32 discard, bool needs_aux); +					   S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http);  	void deleteRequest(const LLUUID& id, bool cancel);  	bool getRequestFinished(const LLUUID& id, S32& discard_level,  							LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux); @@ -77,7 +77,7 @@ public:  	// Debug  	BOOL isFromLocalCache(const LLUUID& id);  	S32 getFetchState(const LLUUID& id, F32& decode_progress_p, F32& requested_priority_p, -					  U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p); +					  U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http);  	void dump();  	S32 getNumRequests() ;  	S32 getNumHTTPRequests() ; diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b39ee8b2e0..ed3d6a0464 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -587,7 +587,7 @@ bool LLViewerInventoryCategory::fetch()  		std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");  		if (!url.empty()) //Capability found.  Build up LLSD and use it.  		{ -			LLInventoryModelBackgroundFetch::instance().start(mUUID);			 +			LLInventoryModelBackgroundFetch::instance().start(mUUID, false);			  		}  		else  		{	//Deprecated, but if we don't have a capability, use the old system. diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 3615c85aec..279570a0e8 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -492,6 +492,7 @@ void LLViewerTexture::init(bool firstinit)  	mTextureState = NO_DELETE ;  	mDontDiscard = FALSE; +	mCanResetMaxVirtualSize = true ;  	mMaxVirtualSize = 0.f;  	mNeedsGLTexture = FALSE ;  	mNeedsResetMaxVirtualSize = FALSE ; @@ -540,6 +541,11 @@ void LLViewerTexture::setBoostLevel(S32 level)  		if(mBoostLevel != LLViewerTexture::BOOST_NONE)  		{  			setNoDelete() ;		 + +			if(LLViewerTexture::BOOST_AVATAR_BAKED_SELF == mBoostLevel || LLViewerTexture::BOOST_AVATAR_BAKED == mBoostLevel) +			{ +				mCanResetMaxVirtualSize = false ; +			}  		}  		if(gAuditTexture)  		{ @@ -613,7 +619,7 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co  void LLViewerTexture::resetTextureStats()  { -	mMaxVirtualSize = 0.0f; +	mMaxVirtualSize = 0.0f ;  	mAdditionalDecodePriority = 0.f ;	  	mNeedsResetMaxVirtualSize = FALSE ;  } @@ -1071,6 +1077,7 @@ void LLViewerFetchedTexture::init(bool firstinit)  	mRequestedDiscardLevel = -1;  	mRequestedDownloadPriority = 0.f;  	mFullyLoaded = FALSE; +	mCanUseHTTP = true ;  	mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;  	mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; @@ -1672,7 +1679,11 @@ void LLViewerFetchedTexture::updateVirtualSize()  			setAdditionalDecodePriority(facep->getImportanceToCamera()) ;  		}  	} -	mNeedsResetMaxVirtualSize = TRUE ; + +	if(mCanResetMaxVirtualSize) +	{ +		mNeedsResetMaxVirtualSize = TRUE ; +	}  	reorganizeFaceList() ;  	reorganizeVolumeList();  } @@ -1753,7 +1764,7 @@ bool LLViewerFetchedTexture::updateFetch()  		else  		{  			mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, -																		mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); +																		mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP);  		}  		// We may have data ready regardless of whether or not we are finished (e.g. waiting on write) @@ -1893,7 +1904,7 @@ bool LLViewerFetchedTexture::updateFetch()  		// bypass texturefetch directly by pulling from LLTextureCache  		bool fetch_request_created = false;  		fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), decode_priority, -																			  w, h, c, desired_discard, needsAux()); +																			  w, h, c, desired_discard, needsAux(), mCanUseHTTP);  		if (fetch_request_created)  		{ @@ -1901,7 +1912,7 @@ bool LLViewerFetchedTexture::updateFetch()  			mIsFetching = TRUE;  			mRequestedDiscardLevel = desired_discard;  			mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, -													   mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); +													   mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP);  		}  		// if createRequest() failed, we're finishing up a request for this UUID, @@ -3298,7 +3309,10 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()  		}  	} -	mNeedsResetMaxVirtualSize = TRUE ; +	if(mCanResetMaxVirtualSize) +	{ +		mNeedsResetMaxVirtualSize = TRUE ; +	}  	reorganizeFaceList() ;  	reorganizeVolumeList(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index a09a711cc7..74c46f3070 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -263,6 +263,7 @@ protected:  	S32 mFullHeight;  	BOOL  mUseMipMaps ;  	S8  mComponents; +	bool mCanResetMaxVirtualSize;  	mutable F32 mMaxVirtualSize;	// The largest virtual size of the image, in pixels - how much data to we need?  	mutable S8  mNeedsGLTexture;  	mutable BOOL mNeedsResetMaxVirtualSize ; @@ -456,6 +457,8 @@ public:  	BOOL		isFullyLoaded() const;  	BOOL        hasFetcher() const { return mHasFetcher;} +	void        setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} +  protected:  	/*virtual*/ void switchToCachedImage();  	S32 getCurrentDiscardLevelForFetching() ; @@ -505,6 +508,7 @@ protected:  	S8  mIsRawImageValid;  	S8  mHasFetcher;				// We've made a fecth request  	S8  mIsFetching;				// Fetch request is active +	bool mCanUseHTTP ;              //This texture can be fetched through http if true.  	mutable S8 mIsMissingAsset;		// True if we know that there is no image asset with this image id in the database.		 diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c51a7d9cbb..ac109771dd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -104,8 +104,6 @@  #include <boost/lexical_cast.hpp> -#define DISPLAY_AVATAR_LOAD_TIMES -  using namespace LLVOAvatarDefines;  //----------------------------------------------------------------------------- @@ -4087,6 +4085,7 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel  {  	mMaxPixelArea = llmax(pixel_area, mMaxPixelArea);  	mMinPixelArea = llmin(pixel_area, mMinPixelArea); +	imagep->resetTextureStats();  	imagep->addTextureStats(pixel_area / texel_area_ratio);  	imagep->setBoostLevel(boost_level);  } @@ -5358,6 +5357,14 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi  {  	S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState()); +	// This should never happen unless the server didn't process the attachment point +	// correctly, but putting this check in here to be safe. +	if (attachmentID & ATTACHMENT_ADD) +	{ +		llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl; +		attachmentID &= ~ATTACHMENT_ADD; +	} +	  	LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL);  	if (!attachment) @@ -5769,16 +5776,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)  	mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); -#ifdef DISPLAY_AVATAR_LOAD_TIMES -	if (!mPreviousFullyLoaded && !loading && mFullyLoaded) +	if (gSavedSettings.getBOOL("DebugAvatarRezTime"))  	{ -		llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; -		LLSD args; -		args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); -		args["NAME"] = getFullname(); -		LLNotificationsUtil::add("AvatarRezNotification",args); +		if (!mPreviousFullyLoaded && !loading && mFullyLoaded) +		{ +			llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; +			LLSD args; +			args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); +			args["NAME"] = getFullname(); +			LLNotificationsUtil::add("AvatarRezNotification",args); +		}  	} -#endif  	// did our loading state "change" from last call?  	const S32 UPDATE_RATE = 30; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2e2b2c02c3..9bcec9e13d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -268,7 +268,7 @@ BOOL	LLPipeline::sRenderParticleBeacons = FALSE;  BOOL	LLPipeline::sRenderSoundBeacons = FALSE;  BOOL	LLPipeline::sRenderBeacons = FALSE;  BOOL	LLPipeline::sRenderHighlight = TRUE; -BOOL	LLPipeline::sForceOldBakedUpload = FALSE; +BOOL	LLPipeline::sForceOldBakedUpload = TRUE;  S32		LLPipeline::sUseOcclusion = 0;  BOOL	LLPipeline::sDelayVBUpdate = TRUE;  BOOL	LLPipeline::sAutoMaskAlphaDeferred = TRUE; | 
