Merge from viewer-lynx and conflict resolution

Mon, 29 Feb 2016 19:23:47 +0200

author
andreykproductengine <akleshchev@productengine.com>
date
Mon, 29 Feb 2016 19:23:47 +0200
changeset 48907
595689131143
parent 48904
de1ee5d38324
parent 48906
3ba721d138ff
child 48908
7d463d571eeb

Merge from viewer-lynx and conflict resolution

indra/newview/llviewertexture.cpp file | annotate | diff | revisions
indra/newview/llviewertexturelist.cpp file | annotate | diff | revisions
indra/newview/llvoavatar.cpp file | annotate | diff | revisions
     1.1 --- a/doc/contributions.txt	Mon Feb 29 14:00:04 2016 +0200
     1.2 +++ b/doc/contributions.txt	Mon Feb 29 19:23:47 2016 +0200
     1.3 @@ -187,6 +187,7 @@
     1.4  	STORM-1979
     1.5  	MAINT-5533
     1.6  	MAINT-5756
     1.7 +	MAINT-2199
     1.8  Aralara Rajal
     1.9  Arare Chantilly
    1.10  	CHUIBUG-191
     2.1 --- a/indra/newview/lllocalbitmaps.cpp	Mon Feb 29 14:00:04 2016 +0200
     2.2 +++ b/indra/newview/lllocalbitmaps.cpp	Mon Feb 29 19:23:47 2016 +0200
     2.3 @@ -135,7 +135,7 @@
     2.4  	}
     2.5  
     2.6  	// delete self from gimagelist
     2.7 -	LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_DISCARD);
     2.8 +	LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_STANDARD);
     2.9  	gTextureList.deleteImage(image);
    2.10  
    2.11  	if (image)
    2.12 @@ -207,7 +207,7 @@
    2.13  					texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image);
    2.14  					texture->ref(); 
    2.15  
    2.16 -					gTextureList.addImage(texture, TEX_LIST_DISCARD);
    2.17 +					gTextureList.addImage(texture, TEX_LIST_STANDARD);
    2.18  			
    2.19  					if (optional_firstupdate != UT_FIRSTUSE)
    2.20  					{
    2.21 @@ -215,7 +215,7 @@
    2.22  						replaceIDs(old_id, mWorldID);
    2.23  
    2.24  						// remove old_id from gimagelist
    2.25 -						LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
    2.26 +						LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
    2.27  						if (image != NULL)
    2.28  						{
    2.29  							gTextureList.deleteImage(image);
    2.30 @@ -384,7 +384,7 @@
    2.31  std::vector<LLViewerObject*> LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32 channel)
    2.32  {
    2.33  	std::vector<LLViewerObject*> obj_list;
    2.34 -	LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
    2.35 +	LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
    2.36  
    2.37  	for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++)
    2.38  	{
    2.39 @@ -502,7 +502,7 @@
    2.40  
    2.41  void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
    2.42  {
    2.43 -	LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
    2.44 +	LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
    2.45  	for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++)
    2.46  	{
    2.47  		LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter];
     3.1 --- a/indra/newview/llpanelface.cpp	Mon Feb 29 14:00:04 2016 +0200
     3.2 +++ b/indra/newview/llpanelface.cpp	Mon Feb 29 19:23:47 2016 +0200
     3.3 @@ -2214,7 +2214,7 @@
     3.4  				LLTextureEntry *te = object->getTE(te_index);
     3.5  				if (te)
     3.6  				{
     3.7 -					LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
     3.8 +					LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;
     3.9  					if(!tex)
    3.10  					{
    3.11  						tex = LLViewerFetchedTexture::sDefaultImagep;
     4.1 --- a/indra/newview/lltexturectrl.cpp	Mon Feb 29 14:00:04 2016 +0200
     4.2 +++ b/indra/newview/lltexturectrl.cpp	Mon Feb 29 19:23:47 2016 +0200
     4.3 @@ -1393,7 +1393,7 @@
     4.4  
     4.5  void	LLTextureCtrl::setImageAssetName(const std::string& name)
     4.6  {
     4.7 -	LLPointer<LLUIImage> imagep = LLUI::getUIImage(name);
     4.8 +	LLPointer<LLUIImage> imagep = LLUI::getUIImage(name, LLGLTexture::BOOST_PREVIEW);
     4.9  	if(imagep)
    4.10  	{
    4.11  		LLViewerFetchedTexture* pTexture = dynamic_cast<LLViewerFetchedTexture*>(imagep->getImage().get());
     5.1 --- a/indra/newview/lltexturefetch.cpp	Mon Feb 29 14:00:04 2016 +0200
     5.2 +++ b/indra/newview/lltexturefetch.cpp	Mon Feb 29 19:23:47 2016 +0200
     5.3 @@ -4460,7 +4460,7 @@
     5.4  			mRefetchedAllData += worker->mFormattedImage->getDataSize();
     5.5  
     5.6  			// refetch list only requests/creates normal images, so requesting ui='false'
     5.7 -			LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_DISCARD);
     5.8 +			LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_STANDARD);
     5.9  			if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end())
    5.10  			{
    5.11  				if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel)
     6.1 --- a/indra/newview/llviewertexture.cpp	Mon Feb 29 14:00:04 2016 +0200
     6.2 +++ b/indra/newview/llviewertexture.cpp	Mon Feb 29 19:23:47 2016 +0200
     6.3 @@ -3323,7 +3323,7 @@
     6.4  
     6.5  	setCategory(LLGLTexture::MEDIA);
     6.6  	
     6.7 -	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
     6.8 +	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
     6.9  	if(tex) //this media is a parcel media for tex.
    6.10  	{
    6.11  		tex->setParcelMedia(this);
    6.12 @@ -3333,7 +3333,7 @@
    6.13  //virtual 
    6.14  LLViewerMediaTexture::~LLViewerMediaTexture() 
    6.15  {	
    6.16 -	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
    6.17 +	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
    6.18  	if(tex) //this media is a parcel media for tex.
    6.19  	{
    6.20  		tex->setParcelMedia(NULL);
    6.21 @@ -3388,7 +3388,7 @@
    6.22  
    6.23  	BOOL ret = TRUE;
    6.24  	
    6.25 -	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
    6.26 +	LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
    6.27  	if(tex) //this media is a parcel media for tex.
    6.28  	{
    6.29  		for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
    6.30 @@ -3497,7 +3497,7 @@
    6.31  	const LLTextureEntry* te = facep->getTextureEntry();
    6.32  	if(te && te->getID().notNull())
    6.33  	{
    6.34 -		LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
    6.35 +		LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD);
    6.36  		if(tex)
    6.37  		{
    6.38  			mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it.
    6.39 @@ -3526,7 +3526,7 @@
    6.40  	const LLTextureEntry* te = facep->getTextureEntry();
    6.41  	if(te && te->getID().notNull())
    6.42  	{
    6.43 -		LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
    6.44 +		LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD);
    6.45  		if(tex)
    6.46  		{
    6.47  			for(std::list< LLPointer<LLViewerTexture> >::iterator iter = mTextureList.begin();
    6.48 @@ -3635,10 +3635,10 @@
    6.49  			const LLTextureEntry* te = facep->getTextureEntry();
    6.50  			if(te)
    6.51  			{
    6.52 -				LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
    6.53 +				LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;
    6.54  				if(!tex && te->getID() != mID)//try parcel media.
    6.55  				{
    6.56 -					tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
    6.57 +					tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
    6.58  				}
    6.59  				if(!tex)
    6.60  				{
     7.1 --- a/indra/newview/llviewertexture.h	Mon Feb 29 14:00:04 2016 +0200
     7.2 +++ b/indra/newview/llviewertexture.h	Mon Feb 29 19:23:47 2016 +0200
     7.3 @@ -661,7 +661,7 @@
     7.4  	static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename,									 
     7.5  									 FTType f_type = FTT_LOCAL_FILE,
     7.6  									 BOOL usemipmap = TRUE,
     7.7 -									 LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI,
     7.8 +									 LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,
     7.9  									 S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
    7.10  									 LLGLint internal_format = 0,
    7.11  									 LLGLenum primary_format = 0,
     8.1 --- a/indra/newview/llviewertexturelist.cpp	Mon Feb 29 14:00:04 2016 +0200
     8.2 +++ b/indra/newview/llviewertexturelist.cpp	Mon Feb 29 19:23:47 2016 +0200
     8.3 @@ -72,20 +72,18 @@
     8.4  
     8.5  ETexListType get_element_type(S32 priority)
     8.6  {
     8.7 -    // don't discard flag can be used in some cases, but it usually is not set yet
     8.8 -    if (priority == LLViewerFetchedTexture::BOOST_ICON
     8.9 -        || priority == LLViewerFetchedTexture::BOOST_UI)
    8.10 +    if (priority == LLViewerFetchedTexture::BOOST_ICON)
    8.11      {
    8.12 -        return TEX_LIST_UI;
    8.13 +        return TEX_LIST_SCALE;
    8.14      }
    8.15 -    return TEX_LIST_DISCARD;
    8.16 +    return TEX_LIST_STANDARD;
    8.17  }
    8.18  
    8.19  ///////////////////////////////////////////////////////////////////////////////
    8.20  
    8.21  LLTextureKey::LLTextureKey()
    8.22  : textureId(LLUUID::null),
    8.23 -textureType(TEX_LIST_DISCARD)
    8.24 +textureType(TEX_LIST_STANDARD)
    8.25  {
    8.26  }
    8.27  
    8.28 @@ -591,7 +589,7 @@
    8.29  
    8.30  void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output)
    8.31  {
    8.32 -    LLTextureKey search_key(image_id, TEX_LIST_DISCARD);
    8.33 +    LLTextureKey search_key(image_id, TEX_LIST_STANDARD);
    8.34      uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key);
    8.35      while (iter != mUUIDMap.end() && iter->first.textureId == image_id)
    8.36      {
    8.37 @@ -1597,14 +1595,14 @@
    8.38  	LLUUID image_id;
    8.39  	msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
    8.40  	
    8.41 -	LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_DISCARD);
    8.42 +	LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_STANDARD);
    8.43  	if( image )
    8.44  	{
    8.45  		LL_WARNS() << "Image not in db" << LL_ENDL;
    8.46  		image->setIsMissingAsset();
    8.47  	}
    8.48  
    8.49 -    image = gTextureList.findImage(image_id, TEX_LIST_UI);
    8.50 +    image = gTextureList.findImage(image_id, TEX_LIST_SCALE);
    8.51      if (image)
    8.52      {
    8.53          LL_WARNS() << "Icon not in db" << LL_ENDL;
    8.54 @@ -1691,17 +1689,18 @@
    8.55  	//don't compress UI images
    8.56  	imagep->getGLTexture()->setAllowCompression(false);
    8.57  
    8.58 -	//all UI images are non-deletable, except downloadable icons
    8.59 -	if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON)
    8.60 -	{
    8.61 -		imagep->setNoDelete();
    8.62 -	}
    8.63 -
    8.64  	LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
    8.65  	new_imagep->setScaleStyle(scale_style);
    8.66  
    8.67 -	mUIImages.insert(std::make_pair(name, new_imagep));
    8.68 -	mUITextureList.push_back(imagep);
    8.69 +	if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON &&
    8.70 +		imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW)
    8.71 +	{
    8.72 +		// Don't add downloadable content into this list
    8.73 +		// all UI images are non-deletable and list does not support deletion
    8.74 +		imagep->setNoDelete();
    8.75 +		mUIImages.insert(std::make_pair(name, new_imagep));
    8.76 +		mUITextureList.push_back(imagep);
    8.77 +	}
    8.78  
    8.79  	//Note:
    8.80  	//Some other textures such as ICON also through this flow to be fetched.
     9.1 --- a/indra/newview/llviewertexturelist.h	Mon Feb 29 14:00:04 2016 +0200
     9.2 +++ b/indra/newview/llviewertexturelist.h	Mon Feb 29 19:23:47 2016 +0200
     9.3 @@ -61,8 +61,8 @@
     9.4  
     9.5  enum ETexListType
     9.6  {
     9.7 -    TEX_LIST_DISCARD = 0,
     9.8 -    TEX_LIST_UI
     9.9 +    TEX_LIST_STANDARD = 0,
    9.10 +    TEX_LIST_SCALE // images that will be scaled, they should not be mixed up with regular images
    9.11  };
    9.12  
    9.13  struct LLTextureKey
    10.1 --- a/indra/newview/llvoavatar.cpp	Mon Feb 29 14:00:04 2016 +0200
    10.2 +++ b/indra/newview/llvoavatar.cpp	Mon Feb 29 19:23:47 2016 +0200
    10.3 @@ -1992,7 +1992,7 @@
    10.4  		uuid == IMG_INVISIBLE)
    10.5  	{
    10.6  		// Should already exist, don't need to find it on sim or baked-texture host.
    10.7 -		result = gTextureList.findImage(uuid, TEX_LIST_DISCARD);
    10.8 +		result = gTextureList.findImage(uuid, TEX_LIST_STANDARD);
    10.9  	}
   10.10  	if (!result)
   10.11  	{
   10.12 @@ -4313,7 +4313,7 @@
   10.13  {
   10.14  	for (std::set<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
   10.15  	{
   10.16 -		LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
   10.17 +		LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
   10.18  		if (imagep && imagep->getDiscardLevel()!=0)
   10.19  		{
   10.20  			return false;
   10.21 @@ -4385,7 +4385,7 @@
   10.22  	S32Bytes result(0);
   10.23  	for (std::set<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
   10.24  	{
   10.25 -		LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
   10.26 +		LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
   10.27  		if (imagep)
   10.28  		{
   10.29  			result += imagep->getTextureMemory();
   10.30 @@ -4473,7 +4473,7 @@
   10.31  	{
   10.32  		if (new_texture_ids.find(*it) == new_texture_ids.end())
   10.33  		{
   10.34 -			LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
   10.35 +			LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
   10.36  			if (imagep)
   10.37  			{
   10.38  				current_texture_mem += imagep->getTextureMemory();

mercurial