diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-09-10 17:38:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 17:38:32 -0700 |
commit | f90712b9837957f2a0d11386c6bf48e9a48ff745 (patch) | |
tree | df1dbaf2d2024bed5cd4dd0cd8a80d1ce3f71e2c /indra/newview/llviewertexture.cpp | |
parent | 13e74a32871c7c8f7c7556c6fc08150fc6f27876 (diff) | |
parent | cde5d29faf84c5cb7fc1b0d0ff6d03f3b7354c8f (diff) |
Merge pull request #2544 from secondlife/davep-profile-session-9/10
Profile guided optimizations
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 681d91c945..9e1cb84bd1 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1361,51 +1361,6 @@ void LLViewerFetchedTexture::addToCreateTexture() } else { - LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; -#if 1 - // - //if mRequestedDiscardLevel > mDesiredDiscardLevel, we assume the required image res keep going up, - //so do not scale down the over qualified image. - //Note: scaling down image is expensensive. Do it only when very necessary. - // - if(mRequestedDiscardLevel <= mDesiredDiscardLevel && !mForceToSaveRawImage) - { - U32 w = mFullWidth >> mRawDiscardLevel; - U32 h = mFullHeight >> mRawDiscardLevel; - - //if big image, do not load extra data - //scale it down to size >= LLViewerTexture::sMinLargeImageSize - if(w * h > LLViewerTexture::sMinLargeImageSize) - { - S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel; - - if(d_level > 0) - { - S32 i = 0; - while((d_level > 0) && ((w >> i) * (h >> i) > LLViewerTexture::sMinLargeImageSize)) - { - i++; - d_level--; - } - if(i > 0) - { - mRawDiscardLevel += i; - if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) - { - mNeedsCreateTexture = false; - destroyRawImage(); - return; - } - - { - //make a duplicate in case somebody else is using this raw image - mRawImage = mRawImage->scaled(w >> i, h >> i); - } - } - } - } - } -#endif scheduleCreateTexture(); } return; |