diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-18 14:51:26 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-18 14:51:26 +0200 |
commit | 97f35b18f08a80ca03437593b9e092ce34a7e6bb (patch) | |
tree | b15ebbe9253899e668fbe3c255f54d26b899012d /indra/newview/llviewertexture.cpp | |
parent | 5c4ab75cdab1b9de08d482457f9d245dd18b90da (diff) | |
parent | a3ca39a437b645be986b9a1fa65821d971d26bcc (diff) |
Merge from default branch.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 1edaeec848..ad993bc056 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1513,16 +1513,20 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { desired_discard -= 2; } - else if (!isJustBound() && mCachedRawImageReady && !mBoostLevel) + else if (!isJustBound() && mCachedRawImageReady) { - // 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; - } - else if (mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == LLViewerTexture::BOOST_NONE) - { - // We haven't rendered this in a while, de-prioritize it - desired_discard += 2; + 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; + //} } + S32 ddiscard = cur_discard - desired_discard; ddiscard = llclamp(ddiscard, 0, 4); priority = (ddiscard+1)*100000.f; @@ -1629,7 +1633,7 @@ bool LLViewerFetchedTexture::updateFetch() S32 desired_discard = getDesiredDiscardLevel(); F32 decode_priority = getDecodePriority(); decode_priority = llmax(decode_priority, 0.0f); - + if (mIsFetching) { // Sets mRawDiscardLevel, mRawImage, mAuxRawImage @@ -1772,10 +1776,10 @@ bool LLViewerFetchedTexture::updateFetch() { make_request = false; } - else if (!isJustBound() && mCachedRawImageReady) - { - make_request = false; - } + //else if (!isJustBound() && mCachedRawImageReady) + //{ + // make_request = false; + //} else { if (mIsFetching) @@ -1847,12 +1851,12 @@ BOOL LLViewerFetchedTexture::forceFetch() { return false ; } - if(mDesiredSavedRawDiscardLevel < getDiscardLevel()) + //if(mDesiredSavedRawDiscardLevel < getDiscardLevel()) { //no need to force fetching. normal fetching flow will do the work. //return false ; } - if (mNeedsCreateTexture) + //if (mNeedsCreateTexture) { // We may be fetching still (e.g. waiting on write) // but don't check until we've processed the raw data we have @@ -1888,7 +1892,8 @@ BOOL LLViewerFetchedTexture::forceFetch() h = getHeight(0); c = getComponents(); } - fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), maxDecodePriority(), + setDecodePriority(maxDecodePriority()) ; + fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), getDecodePriority(), w, h, c, desired_discard, needsAux()); if (fetch_request_created) |