diff options
| -rw-r--r-- | indra/llmessage/llcurl.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llagentcamera.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llagentwearables.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/lltexlayer.cpp | 116 | ||||
| -rw-r--r-- | indra/newview/lltexturefetch.cpp | 20 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.h | 1 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llvoavatarself.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llvoicevivox.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llwearable.cpp | 2 | ||||
| -rw-r--r-- | install.xml | 8 | 
13 files changed, 101 insertions, 88 deletions
| diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 91e11b8c0d..36874a5d48 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -365,6 +365,13 @@ U32 LLCurl::Easy::report(CURLcode code)  		responseReason = strerror(code) + " : " + mErrorBuffer;  	} +	if(responseCode >= 300 && responseCode < 400) //redirect +	{ +		char new_url[512] ; +		curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url); +		responseReason = new_url ; //get the new URL. +	} +  	if (mResponder)  	{	  		mResponder->completedRaw(responseCode, responseReason, mChannels, mOutput); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 644363826a..c3f075fd49 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2360,6 +2360,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came  				mAnimationDuration = gSavedSettings.getF32("ZoomTime");  			}  		} +		gAgentAvatarp->updateMeshTextures();  	}  	else  	{ diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index d823a3cbbb..d79a1e80ed 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -732,7 +732,7 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable  void LLAgentWearables::wearableUpdated(LLWearable *wearable)  { -	gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); +	gAgentAvatarp->wearableUpdated(wearable->getType(), FALSE);  	wearable->refreshName();  	wearable->setLabelUpdated(); @@ -776,7 +776,7 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index)  	if (wearable)  	{  		mWearableDatas[type].erase(mWearableDatas[type].begin() + index); -		gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); +		gAgentAvatarp->wearableUpdated(wearable->getType(), FALSE);  		wearable->setLabelUpdated();  	}  } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a899926938..1032da4990 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2080,7 +2080,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b  	bool result = false;  	if (result = gAgentWearables.moveWearable(item, closer_to_body))  	{ -		gAgentAvatarp->wearableUpdated(item->getWearableType(), TRUE); +		gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE);  	}  	setOutfitDirty(true); diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index d001d692a3..5d51e32515 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -378,40 +378,33 @@ BOOL LLTexLayerSetBuffer::updateImmediate()  void LLTexLayerSetBuffer::readBackAndUpload()  { -	// pointers for storing data to upload -	U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; -	 -	glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); -	stop_glerror(); - -	llinfos << "Baked " << mTexLayerSet->getBodyRegionName() << llendl; +	llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl;  	LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); -	// We won't need our caches since we're baked now.  (Techically, we won't  -	// really be baked until this image is sent to the server and the Avatar -	// Appearance message is received.) +	// Don't need caches since we're baked now.  (note: we won't *really* be baked  +	// until this image is sent to the server and the Avatar Appearance message is received.)  	mTexLayerSet->deleteCaches(); -	LLGLSUIDefault gls_ui; +	// Get the COLOR information from our texture +	U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; +	glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); +	stop_glerror(); +	// Get the MASK information from our texture +	LLGLSUIDefault gls_ui;  	LLPointer<LLImageRaw> baked_mask_image = new LLImageRaw(mFullWidth, mFullHeight, 1 );  	U8* baked_mask_data = baked_mask_image->getData();  -	  	mTexLayerSet->gatherMorphMaskAlpha(baked_mask_data, mFullWidth, mFullHeight); -	// writes into baked_color_data -	const char* comment_text = NULL; -	S32 baked_image_components = 5; // red green blue [bump] clothing +	// Create the baked image from our color and mask information +	const S32 baked_image_components = 5; // red green blue [bump] clothing  	LLPointer<LLImageRaw> baked_image = new LLImageRaw( mFullWidth, mFullHeight, baked_image_components );  	U8* baked_image_data = baked_image->getData(); -	 -	comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // 5 channels: rgb, heightfield/alpha, mask -  	S32 i = 0; -	for( S32 u = 0; u < mFullWidth; u++ ) +	for (S32 u=0; u < mFullWidth; u++)  	{ -		for( S32 v = 0; v < mFullHeight; v++ ) +		for (S32 v=0; v < mFullHeight; v++)  		{  			baked_image_data[5*i + 0] = baked_color_data[4*i + 0];  			baked_image_data[5*i + 1] = baked_color_data[4*i + 1]; @@ -424,21 +417,19 @@ void LLTexLayerSetBuffer::readBackAndUpload()  	LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C;  	compressedImage->setRate(0.f); -	LLTransactionID tid; -	LLAssetID asset_id; -	tid.generate(); -	asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - -	BOOL res = false; -	if( compressedImage->encode(baked_image, comment_text)) +	const char* comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // writes into baked_color_data. 5 channels (rgb, heightfield/alpha, mask) +	if (compressedImage->encode(baked_image, comment_text))  	{ -		res = LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), -								 gVFS, asset_id, LLAssetType::AT_TEXTURE); -		if (res) +		LLTransactionID tid; +		tid.generate(); +		const LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); +		if (LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), +							   gVFS, asset_id, LLAssetType::AT_TEXTURE))  		{ -			LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; +			// Read back the file and validate.  			BOOL valid = FALSE; -			S32 file_size; +			LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; +			S32 file_size = 0;  			U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size);  			if (data)  			{ @@ -449,31 +440,26 @@ void LLTexLayerSetBuffer::readBackAndUpload()  				integrity_test->setLastError("Unable to read entire file");  			} -			if( valid ) +			if (valid)  			{ -				// baked_upload_data is owned by the responder and deleted after the request completes +				// Baked_upload_data is owned by the responder and deleted after the request completes.  				LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp,   																			 this->mTexLayerSet,   																			 asset_id);  				mUploadID = asset_id; -				const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal();	 - -				// upload the image -				std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); +				// Upload the image +				const std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture");  				if(!url.empty() -					&& !LLPipeline::sForceOldBakedUpload) // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method +					&& !LLPipeline::sForceOldBakedUpload) // toggle debug setting UploadBakedTexOld to change between the new caps method and old method  				{ -					llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; -  					LLSD body = LLSD::emptyMap(); +					// The responder will call LLTexLayerSetBuffer::onTextureUploadComplete()  					LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data)); -					// Responder will call LLTexLayerSetBuffer::onTextureUploadComplete() +					llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl;  				}   				else  				{ -					llinfos << "Baked texture upload via Asset Store." <<  llendl; -					// gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);  					gAssetStorage->storeAssetData(tid,  												  LLAssetType::AT_TEXTURE,  												  LLTexLayerSetBuffer::onTextureUploadComplete, @@ -481,49 +467,53 @@ void LLTexLayerSetBuffer::readBackAndUpload()  												  TRUE,		// temp_file  												  TRUE,		// is_priority  												  TRUE);	// store_local +					llinfos << "Baked texture upload via Asset Store." <<  llendl;  				} -				if (gSavedSettings.getBOOL("DebugAvatarRezTime")) -				{ -					std::string lod_str = highest_lod ? "HighRes" : "LowRes"; -					LLSD args; -					args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); -					args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); -					args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); -					args["RESOLUTION"] = lod_str; -					LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); -					llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; -				} - +				const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal();	  				if (highest_lod)  				{ -					// Sending the final LOD for the baked texture. -					// All done, pause the upload timer so we know how long it took. +					// Sending the final LOD for the baked texture.  All done, pause  +					// the upload timer so we know how long it took.  					mNeedsUpload = FALSE;  					mNeedsUploadTimer.pause();  				}  				else  				{ -					// Sending a lower level LOD for the baked texture. -					// Restart the upload timer. +					// Sending a lower level LOD for the baked texture.  Restart the upload timer.  					mNumLowresUploads++;  					mNeedsUploadTimer.unpause();  					mNeedsUploadTimer.reset();  				} + +				// Print out notification that we uploaded this texture. +				if (gSavedSettings.getBOOL("DebugAvatarRezTime")) +				{ +					std::string lod_str = highest_lod ? "HighRes" : "LowRes"; +					LLSD args; +					args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); +					args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); +					args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); +					args["RESOLUTION"] = lod_str; +					LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); +					llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; +				}  			}  			else  			{ +				// The read back and validate operation failed.  Remove the uploaded file.  				mUploadPending = FALSE; -				llinfos << "unable to create baked upload file: corrupted" << llendl;  				LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE, LLVFile::WRITE);  				file.remove(); +				llinfos << "Unable to create baked upload file (reason: corrupted)." << llendl;  			}  		}  	} -	if (!res) +	else  	{ +		// The VFS write file operation failed.  		mUploadPending = FALSE; -		llinfos << "unable to create baked upload file" << llendl; +		llinfos << "Unable to create baked upload file (reason: failed to write file)" << llendl;  	}  	delete [] baked_color_data; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 74b7f123d8..52d227f827 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -329,11 +329,7 @@ public:  					partial = true;  				}  			} -			else -			{ -				worker->setGetStatus(status, reason); -// 				llwarns << status << ": " << reason << llendl; -			} +  			if (!success)  			{  				worker->setGetStatus(status, reason); @@ -912,7 +908,7 @@ bool LLTextureFetchWorker::doWork(S32 param)  				if (mGetStatus == HTTP_NOT_FOUND)  				{  					mHTTPFailCount = max_attempts = 1; // Don't retry -					//llwarns << "Texture missing from server (404): " << mUrl << llendl; +					llwarns << "Texture missing from server (404): " << mUrl << llendl;  					//roll back to try UDP  					if(mCanUseNET) @@ -932,6 +928,17 @@ bool LLTextureFetchWorker::doWork(S32 param)  					max_attempts = mHTTPFailCount+1; // Keep retrying  					LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL;  				} +				else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct +				{ +					++mHTTPFailCount; +					max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop. + +					llwarns << "HTTP GET failed because of redirection: "  << mUrl +							<< " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ; + +					//assign to the new url +					mUrl = mGetReason ; +				}  				else  				{  					const S32 HTTP_MAX_RETRY_COUNT = 3; @@ -941,6 +948,7 @@ bool LLTextureFetchWorker::doWork(S32 param)  							<< " Status: " << mGetStatus << " Reason: '" << mGetReason << "'"  							<< " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl;  				} +  				if (mHTTPFailCount >= max_attempts)  				{  					if (cur_size > 0) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 7e779986df..9b5b210bf7 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -541,11 +541,6 @@ 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)  		{ @@ -596,6 +591,11 @@ void LLViewerTexture::forceImmediateUpdate()  {  } +void LLViewerTexture::setResetMaxVirtualSizeFlag(bool flag)  +{ +	mCanResetMaxVirtualSize = flag ; +} +  void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const   {  	if(needs_gltexture) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 1bd4cc793d..361f56e02f 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -166,6 +166,7 @@ public:  	void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const;  	void resetTextureStats();	 +	void setResetMaxVirtualSizeFlag(bool flag) ;  	virtual F32  getMaxVirtualSize() ; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1fa953f157..b5faa984eb 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4209,10 +4209,16 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel  {  	mMaxPixelArea = llmax(pixel_area, mMaxPixelArea);  	mMinPixelArea = llmin(pixel_area, mMinPixelArea); +  	imagep->resetTextureStats(); +	imagep->setResetMaxVirtualSizeFlag(false) ;  	imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures.  	imagep->addTextureStats(pixel_area / texel_area_ratio);  	imagep->setBoostLevel(boost_level); +	if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) +	{ +		imagep->setAdditionalDecodePriority(1.0f) ; +	}  }  //virtual	 diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 2722646eff..6e7df878bb 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -975,12 +975,6 @@ void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_re  		const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;  		const LLVOAvatarDefines::EBakedTextureIndex index = baked_iter->first; -		// if we're editing our appearance, ensure that we're not using baked textures -		// The baked texture for alpha masks is set explicitly when you hit "save" -		if (gAgentCamera.cameraCustomizeAvatar()) -		{ -			setNewBakedTexture(index,IMG_DEFAULT_AVATAR); -		}  		if (baked_dict)  		{  			for (LLVOAvatarDefines::wearables_vec_t::const_iterator type_iter = baked_dict->mWearables.begin(); @@ -2036,8 +2030,13 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe  			F32 desired_pixels;  			desired_pixels = llmin(mPixelArea, (F32)getTexImageArea());  			imagep->setBoostLevel(getAvatarBoostLevel()); + +			imagep->resetTextureStats(); +			imagep->setResetMaxVirtualSizeFlag(false) ;  			imagep->addTextureStats( desired_pixels / texel_area_ratio ); +			imagep->setAdditionalDecodePriority(1.0f) ;  			imagep->forceUpdateBindStats() ; +			  			if (imagep->getDiscardLevel() < 0)  			{  				mHasGrey = TRUE; // for statistics gathering diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c6c155f0f0..d6028b78cb 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5112,6 +5112,7 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)  			LLVoiceChannel::getCurrentVoiceChannel()->deactivate();  			status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED;  		} +		notifyStatusObservers(status);		  	}  } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 121e691710..46c736c853 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -705,7 +705,7 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake  	}  	gAgentAvatarp->updateVisualParams(); -	gAgentAvatarp->wearableUpdated(type, TRUE); +	gAgentAvatarp->wearableUpdated(type, FALSE);  //	if( upload_bake )  //	{ diff --git a/install.xml b/install.xml index ccebe2fe50..8387372400 100644 --- a/install.xml +++ b/install.xml @@ -111,9 +111,9 @@            <key>darwin</key>            <map>              <key>md5sum</key> -            <string>d9ce3ace9235249b7edf6f564de83395</string> +            <string>cdb2f5c4a5a1f9ecd75bc1dbdd4db8e9</string>              <key>url</key> -            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ares-1.4.0-darwin-20080731b.tar.bz2</uri> +            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ares-1.7.1-darwin-20100606.tar.bz2</uri>            </map>            <key>linux</key>            <map> @@ -233,9 +233,9 @@            <key>darwin</key>            <map>              <key>md5sum</key> -            <string>1bece4ebdc5fc3818854bc3df14b511b</string> +            <string>752e295ccb17f0dcb7c0167db3ad1e69</string>              <key>url</key> -            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.16.4a-darwin-20090304.tar.bz2</uri> +            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.20.1-darwin-20100606.tar.bz2</uri>            </map>            <key>linux</key>            <map> | 
