diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-03-29 10:53:22 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-03-29 10:53:22 -0400 |
commit | 783eb286a67e6f9ace5561073a16c9c1b7f1ade5 (patch) | |
tree | 1b4a6d5a81527202860d3cfc217c30d4e1a67880 /indra/newview/llviewertexture.cpp | |
parent | f428d62c93f2cd2817e055fce7db49410e8324d6 (diff) | |
parent | 61657d2e7904ba7274a0ab5d451669d2ee7bb7cc (diff) |
merge
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 133b6ee8c9..af0dcd8e35 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1546,8 +1546,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else { - // Leave the priority as-is - return mDecodePriority; + priority = -1.f; //stop fetching } } else if (cur_discard < 0) @@ -1579,12 +1578,12 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if (!isJustBound() && mCachedRawImageReady) { - //if(mBoostLevel < BOOST_HIGH) - //{ - // // We haven't rendered this in a while, de-prioritize it - // desired_discard += 2; - //} - //else + if(mBoostLevel < BOOST_HIGH) + { + // We haven't rendered this in a while, de-prioritize it + desired_discard += 2; + } + else { // We haven't rendered this in the last half second, and we have a cached raw image, leave the desired discard as-is desired_discard = cur_discard; @@ -1592,7 +1591,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } S32 ddiscard = cur_discard - desired_discard; - ddiscard = llclamp(ddiscard, 0, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); + ddiscard = llclamp(ddiscard, -1, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; } @@ -2262,11 +2261,14 @@ void LLViewerFetchedTexture::destroyRawImage() { sRawCount--; - if(mForceToSaveRawImage) + if(mIsRawImageValid) { - saveRawImage() ; - } - setCachedRawImage() ; + if(mForceToSaveRawImage) + { + saveRawImage() ; + } + setCachedRawImage() ; + } } mRawImage = NULL; |