diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-05-01 08:11:15 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-01 08:11:15 -0700 |
commit | 025c8909582f59f68f786d52bea06f5a272df0b5 (patch) | |
tree | 6d9980e216f89c74776155432b32e6778f3b6367 /indra/newview/llviewertexture.cpp | |
parent | 536a30d7f2083d39dbd6d06f16fa53064c3ee379 (diff) | |
parent | 70c1e21956b8589c9873ac5fa6a05467dc2e0a89 (diff) |
Merge vwr-dev-mat
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-x | indra/newview/llviewertexture.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d35b1c8492..037e53484d 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -564,7 +564,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity } } sDesiredDiscardBias = llclamp(sDesiredDiscardBias, desired_discard_bias_min, desired_discard_bias_max); - + F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ; F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed(); sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1); @@ -871,10 +871,10 @@ void LLViewerTexture::reorganizeFaceList() for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i) { if(mNumFaces[i] + MAX_EXTRA_BUFFER_SIZE > mFaceList[i].size()) - { - return ; - } - + { + return ; + } + mFaceList[i].erase(mFaceList[i].begin() + mNumFaces[i], mFaceList[i].end()); } @@ -1373,7 +1373,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) return FALSE; } - res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); + res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); setActive() ; @@ -1668,27 +1668,27 @@ void LLViewerFetchedTexture::updateVirtualSize() llassert(mNumFaces[ch] <= mFaceList[ch].size()); for(U32 i = 0 ; i < mNumFaces[ch]; i++) - { + { LLFace* facep = mFaceList[ch][i] ; - if( facep ) - { - LLDrawable* drawable = facep->getDrawable(); - if (drawable) + if( facep ) { - if(drawable->isRecentlyVisible()) + LLDrawable* drawable = facep->getDrawable(); + if (drawable) { - if (getBoostLevel() == LLViewerTexture::BOOST_NONE && - drawable->getVObj() && drawable->getVObj()->isSelected()) + if(drawable->isRecentlyVisible()) { - setBoostLevel(LLViewerTexture::BOOST_SELECTED); + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) + { + setBoostLevel(LLViewerTexture::BOOST_SELECTED); + } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; } - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; } } } } - } //reset whether or not a face was selected after 10 seconds const F32 SELECTION_RESET_TIME = 10.f; @@ -3123,12 +3123,12 @@ BOOL LLViewerMediaTexture::findFaces() { const ll_face_list_t* face_list = tex->getFaceList(ch) ; U32 end = tex->getNumFaces(ch) ; - for(U32 i = 0 ; i < end ; i++) - { - mMediaFaceList.push_back((*face_list)[i]) ; + for(U32 i = 0 ; i < end ; i++) + { + mMediaFaceList.push_back((*face_list)[i]) ; + } } } - } if(!mMediaImplp) { @@ -3271,9 +3271,9 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) for (U32 ch = 0; ch < 3; ++ch) { - // - //we have some trouble here: the texture of the face is changed. - //we need to find the former texture, and remove it from the list to avoid memory leaking. + // + //we have some trouble here: the texture of the face is changed. + //we need to find the former texture, and remove it from the list to avoid memory leaking. llassert(mNumFaces[ch] <= mFaceList[ch].size()); @@ -3447,14 +3447,14 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() { llassert(mNumFaces[ch] <= mFaceList[ch].size()); for(U32 i = 0 ; i < mNumFaces[ch] ; i++) - { - LLFace* facep = mFaceList[ch][i] ; - if(facep->getDrawable()->isRecentlyVisible()) { - addTextureStats(facep->getVirtualSize()) ; - } - } - } + LLFace* facep = mFaceList[ch][i] ; + if(facep->getDrawable()->isRecentlyVisible()) + { + addTextureStats(facep->getVirtualSize()) ; + } + } + } } else //media is not in playing { |