BUG-11933: Ignore invisiprim textures in saved texture list.

Wed, 11 May 2016 21:42:52 -0500

author
Tonya Souther <tonya.souther@gmail.com>
date
Wed, 11 May 2016 21:42:52 -0500
changeset 48965
79f76ecb6bc8
parent 48964
6ef91b579e05
child 48966
e5afca0dc5fd

BUG-11933: Ignore invisiprim textures in saved texture list.

indra/newview/llviewertexture.cpp file | annotate | diff | revisions
indra/newview/llviewertexture.h file | annotate | diff | revisions
indra/newview/llviewertexturelist.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llviewertexture.cpp	Wed May 11 18:13:12 2016 -0500
     1.2 +++ b/indra/newview/llviewertexture.cpp	Wed May 11 21:42:52 2016 -0500
     1.3 @@ -126,6 +126,11 @@
     1.4  const F32 desired_discard_bias_max = (F32)MAX_DISCARD_LEVEL; // max number of levels to reduce image quality by
     1.5  const F64 log_2 = log(2.0);
     1.6  
     1.7 +LLUUID LLViewerTexture::sInvisiprimTexture1 = LLUUID::null;
     1.8 +LLUUID LLViewerTexture::sInvisiprimTexture2 = LLUUID::null;
     1.9 +#define TEX_INVISIPRIM1 "e97cf410-8e61-7005-ec06-629eba4cd1fb"
    1.10 +#define TEX_INVISIPRIM2 "38b86f85-2575-52a9-a531-23108d8da837"
    1.11 +
    1.12  //----------------------------------------------------------------------------------------------
    1.13  //namespace: LLViewerTextureAccess
    1.14  //----------------------------------------------------------------------------------------------
    1.15 @@ -479,6 +484,15 @@
    1.16  	{
    1.17  		sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
    1.18  	}
    1.19 +
    1.20 +	if (sInvisiprimTexture1.isNull())
    1.21 +	{
    1.22 +		sInvisiprimTexture1 = LLUUID(TEX_INVISIPRIM1);
    1.23 +	}
    1.24 +	if (sInvisiprimTexture2.isNull())
    1.25 +	{
    1.26 +		sInvisiprimTexture2 = LLUUID(TEX_INVISIPRIM2);
    1.27 +	}
    1.28  }
    1.29  
    1.30  // tuning params
    1.31 @@ -1030,6 +1044,17 @@
    1.32  	return  (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize;
    1.33  }
    1.34  
    1.35 +bool LLViewerTexture::isInvisiprim()
    1.36 +{
    1.37 +	return isInvisiprim(mID);
    1.38 +}
    1.39 +
    1.40 +//static
    1.41 +bool LLViewerTexture::isInvisiprim(LLUUID id)
    1.42 +{
    1.43 +	return (id == sInvisiprimTexture1) || (id == sInvisiprimTexture2);
    1.44 +}
    1.45 +
    1.46  //virtual 
    1.47  void LLViewerTexture::updateBindStatsForTester()
    1.48  {
     2.1 --- a/indra/newview/llviewertexture.h	Wed May 11 18:13:12 2016 -0500
     2.2 +++ b/indra/newview/llviewertexture.h	Wed May 11 21:42:52 2016 -0500
     2.3 @@ -164,6 +164,8 @@
     2.4  	
     2.5  	virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
     2.6  	BOOL isLargeImage() ;	
     2.7 +	bool isInvisiprim() ;
     2.8 +	static bool isInvisiprim(LLUUID id) ;
     2.9  	
    2.10  	void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;}
    2.11  	BOOL hasParcelMedia() const { return mParcelMedia != NULL;}
    2.12 @@ -236,6 +238,8 @@
    2.13  	static S32 sMaxSmallImageSize ;
    2.14  	static BOOL sFreezeImageScalingDown ;//do not scale down image res if set.
    2.15  	static F32  sCurrentTime ;
    2.16 +	static LLUUID sInvisiprimTexture1 ;
    2.17 +	static LLUUID sInvisiprimTexture2 ;
    2.18  
    2.19  	enum EDebugTexels
    2.20  	{
     3.1 --- a/indra/newview/llviewertexturelist.cpp	Wed May 11 18:13:12 2016 -0500
     3.2 +++ b/indra/newview/llviewertexturelist.cpp	Wed May 11 21:42:52 2016 -0500
     3.3 @@ -228,7 +228,7 @@
     3.4  		S32 pixel_area = imagesd["area"];
     3.5  		S32 texture_type = imagesd["type"];
     3.6  
     3.7 -		if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type)
     3.8 +		if((LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type) && !LLViewerTexture::isInvisiprim(uuid))
     3.9  		{
    3.10  			LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type);
    3.11  			if (image)
    3.12 @@ -263,7 +263,8 @@
    3.13  			!image->getUseDiscard() ||
    3.14  			image->needsAux() ||
    3.15  			image->getTargetHost() != LLHost::invalid ||
    3.16 -			!image->getUrl().empty()
    3.17 +			!image->getUrl().empty() ||
    3.18 +			image->isInvisiprim()
    3.19  			)
    3.20  		{
    3.21  			continue; // avoid UI, baked, and other special images

mercurial