diff options
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-x | indra/newview/llviewertexture.cpp | 225 |
1 files changed, 130 insertions, 95 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 84f66c359f..80f8ea7e66 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -29,7 +29,6 @@ #include "llviewertexture.h" // Library includes -#include "imageids.h" #include "llmath.h" #include "llerror.h" #include "llgl.h" @@ -63,6 +62,11 @@ #include "lltexturecache.h" /////////////////////////////////////////////////////////////////////////////// +// extern +const S32Mibibytes gMinVideoRam(32); +const S32Mibibytes gMaxVideoRam(512); + + // statics LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL; LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = NULL; @@ -82,11 +86,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -S32 LLViewerTexture::sBoundTextureMemoryInBytes = 0; -S32 LLViewerTexture::sTotalTextureMemoryInBytes = 0; -S32 LLViewerTexture::sMaxBoundTextureMemInMegaBytes = 0; -S32 LLViewerTexture::sMaxTotalTextureMemInMegaBytes = 0; -S32 LLViewerTexture::sMaxDesiredTextureMemInBytes = 0 ; +S32Bytes LLViewerTexture::sBoundTextureMemory; +S32Bytes LLViewerTexture::sTotalTextureMemory; +S32Mibibytes LLViewerTexture::sMaxBoundTextureMem; +S32Mibibytes LLViewerTexture::sMaxTotalTextureMem; +S32Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -218,7 +222,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTex if(report_error) { - llerrs << "not a fetched texture type: " << type << llendl ; + LL_ERRS() << "not a fetched texture type: " << type << LL_ENDL ; } return NULL ; @@ -275,7 +279,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( } LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( - const std::string& filename, + const std::string& filename, FTType f_type, BOOL usemipmaps, LLViewerTexture::EBoostLevel boost_priority, @@ -288,7 +292,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( } //static -LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, +LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, FTType f_type, BOOL usemipmaps, LLViewerTexture::EBoostLevel boost_priority, @@ -395,7 +399,7 @@ void LLViewerTextureManager::init() LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE); LLViewerTexture::initClass() ; - + // Create a texture manager bridge. gTextureManagerBridgep = new LLViewerTextureManagerBridge; @@ -526,17 +530,17 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity LLViewerMediaTexture::updateClass() ; } - sBoundTextureMemoryInBytes = LLImageGL::sBoundTextureMemoryInBytes;//in bytes - sTotalTextureMemoryInBytes = LLImageGL::sGlobalTextureMemoryInBytes;//in bytes - sMaxBoundTextureMemInMegaBytes = gTextureList.getMaxResidentTexMem();//in MB - sMaxTotalTextureMemInMegaBytes = gTextureList.getMaxTotalTextureMem() ;//in MB - sMaxDesiredTextureMemInBytes = MEGA_BYTES_TO_BYTES(sMaxTotalTextureMemInMegaBytes) ; //in Bytes, by default and when total used texture memory is small. + sBoundTextureMemory = LLImageGL::sBoundTextureMemory; + sTotalTextureMemory = LLImageGL::sGlobalTextureMemory; + sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem(); + sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem(); + sMaxDesiredTextureMem = sMaxTotalTextureMem ; //in Bytes, by default and when total used texture memory is small. - if (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) >= sMaxBoundTextureMemInMegaBytes || - BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) >= sMaxTotalTextureMemInMegaBytes) + if (sBoundTextureMemory >= sMaxBoundTextureMem || + sTotalTextureMemory >= sMaxTotalTextureMem) { - //when texture memory overflows, lower down the threashold to release the textures more aggressively. - sMaxDesiredTextureMemInBytes = llmin((S32)(sMaxDesiredTextureMemInBytes * 0.75f) , MEGA_BYTES_TO_BYTES(MAX_VIDEO_RAM_IN_MEGA_BYTES)) ;//512 MB + //when texture memory overflows, lower down the threshold to release the textures more aggressively. + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, S32Bytes(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level @@ -552,8 +556,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sEvaluationTimer.reset(); } else if (sDesiredDiscardBias > 0.0f && - BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale && - BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale) + sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale && + sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale) { // If we are using less texture memory than we should, // scale down the desired discard level @@ -564,14 +568,14 @@ 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); sCameraMovingDiscardBias = (S8)(sCameraMovingBias); - LLViewerTexture::sFreezeImageScalingDown = (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < 0.75f * sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale) && - (BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < 0.75f * sMaxTotalTextureMemInMegaBytes * texmem_middle_bound_scale) ; + LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) && + (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale) ; } //end of static functions @@ -616,7 +620,7 @@ LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) : LLViewerTexture::~LLViewerTexture() { - // LL_DEBUGS("Avatar") << mID << llendl; + // LL_DEBUGS("Avatar") << mID << LL_ENDL; cleanup(); sImageCount--; } @@ -660,9 +664,9 @@ void LLViewerTexture::dump() { LLGLTexture::dump(); - llinfos << "LLViewerTexture" + LL_INFOS() << "LLViewerTexture" << " mID " << mID - << llendl; + << LL_ENDL; } void LLViewerTexture::setBoostLevel(S32 level) @@ -681,6 +685,30 @@ void LLViewerTexture::setBoostLevel(S32 level) { mSelectedTime = gFrameTimeSeconds; } + +} + +bool LLViewerTexture::isActiveFetching() +{ + return false; +} + +bool LLViewerTexture::bindDebugImage(const S32 stage) +{ + if (stage < 0) return false; + + bool res = true; + if (LLViewerTexture::sCheckerBoardImagep.notNull() && (this != LLViewerTexture::sCheckerBoardImagep.get())) + { + res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sCheckerBoardImagep); + } + + if(!res) + { + return bindDefaultImage(stage); + } + + return res; } bool LLViewerTexture::bindDefaultImage(S32 stage) @@ -699,7 +727,7 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) } if (!res) { - llwarns << "LLViewerTexture::bindDefaultImage failed." << llendl; + LL_WARNS() << "LLViewerTexture::bindDefaultImage failed." << LL_ENDL; } stop_glerror(); @@ -865,16 +893,16 @@ void LLViewerTexture::reorganizeFaceList() if(mLastFaceListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME) { - return; + return ; } 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()); } @@ -1097,7 +1125,7 @@ void LLViewerFetchedTexture::loadFromFastCache() { //discard all oversized textures. destroyRawImage(); - llwarns << "oversized, setting as missing" << llendl; + LL_WARNS() << "oversized, setting as missing" << LL_ENDL; setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL ; } @@ -1174,32 +1202,32 @@ void LLViewerFetchedTexture::dump() { LLViewerTexture::dump(); - llinfos << "Dump : " << mID + LL_INFOS() << "Dump : " << mID << ", mIsMissingAsset = " << (S32)mIsMissingAsset << ", mFullWidth = " << (S32)mFullWidth << ", mFullHeight = " << (S32)mFullHeight << ", mOrigWidth = " << (S32)mOrigWidth << ", mOrigHeight = " << (S32)mOrigHeight - << llendl; - llinfos << " : " + << LL_ENDL; + LL_INFOS() << " : " << " mFullyLoaded = " << (S32)mFullyLoaded << ", mFetchState = " << (S32)mFetchState << ", mFetchPriority = " << (S32)mFetchPriority << ", mDownloadProgress = " << (F32)mDownloadProgress - << llendl; - llinfos << " : " + << LL_ENDL; + LL_INFOS() << " : " << " mHasFetcher = " << (S32)mHasFetcher << ", mIsFetching = " << (S32)mIsFetching << ", mIsFetched = " << (S32)mIsFetched << ", mBoostLevel = " << (S32)mBoostLevel - << llendl; + << LL_ENDL; } /////////////////////////////////////////////////////////////////////////////// // ONLY called from LLViewerFetchedTextureList void LLViewerFetchedTexture::destroyTexture() { - if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes * 0.95f)//not ready to release unused memory. + if(LLImageGL::sGlobalTextureMemory < sMaxDesiredTextureMem * 0.95f)//not ready to release unused memory. { return ; } @@ -1207,8 +1235,8 @@ void LLViewerFetchedTexture::destroyTexture() { return ; } - - //LL_DEBUGS("Avatar") << mID << llendl; + + //LL_DEBUGS("Avatar") << mID << LL_ENDL; destroyGLTexture() ; mFullyLoaded = FALSE ; } @@ -1229,7 +1257,7 @@ void LLViewerFetchedTexture::addToCreateTexture() llassert(mNumFaces[j] <= mFaceList[j].size()); for(U32 i = 0 ; i < mNumFaces[j]; i++) - { + { mFaceList[j][i]->dirtyTexture() ; } } @@ -1318,12 +1346,12 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mNeedsCreateTexture = FALSE; if (mRawImage.isNull()) { - llerrs << "LLViewerTexture trying to create texture with no Raw Image" << llendl; + LL_ERRS() << "LLViewerTexture trying to create texture with no Raw Image" << LL_ENDL; } -// llinfos << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ", +// LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ", // mRawDiscardLevel, // mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize()) -// << mID.getString() << llendl; +// << mID.getString() << LL_ENDL; BOOL res = TRUE; // store original size only for locally-sourced images @@ -1358,14 +1386,14 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel; if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE ) { - llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl; + LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL; size_okay = false; } if (!LLImageGL::checkSize(mRawImage->getWidth(), mRawImage->getHeight())) { // A non power-of-two image was uploaded (through a non standard client) - llinfos << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << llendl; + LL_INFOS() << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << LL_ENDL; size_okay = false; } @@ -1374,13 +1402,13 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) // An inappropriately-sized image was uploaded (through a non standard client) // We treat these images as missing assets which causes them to // be renderd as 'missing image' and to stop requesting data - llwarns << "!size_ok, setting as missing" << llendl; + LL_WARNS() << "!size_ok, setting as missing" << LL_ENDL; setIsMissingAsset(); destroyRawImage(); return FALSE; } - res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); + res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); setActive() ; @@ -1671,31 +1699,31 @@ void LLViewerFetchedTexture::updateVirtualSize() } for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) - { + { llassert(mNumFaces[ch] <= mFaceList[ch].size()); for(U32 i = 0 ; i < mNumFaces[ch]; i++) { LLFace* facep = mFaceList[ch][i] ; - if( facep ) + if( facep ) + { + LLDrawable* drawable = facep->getDrawable(); + if (drawable) { - LLDrawable* drawable = facep->getDrawable(); - if (drawable) + if(drawable->isRecentlyVisible()) { - if(drawable->isRecentlyVisible()) + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) { - if (getBoostLevel() == LLViewerTexture::BOOST_NONE && - drawable->getVObj() && drawable->getVObj()->isSelected()) - { - setBoostLevel(LLViewerTexture::BOOST_SELECTED); - } - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + setBoostLevel(LLViewerTexture::BOOST_SELECTED); } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; } } } } + } //reset whether or not a face was selected after 10 seconds const F32 SELECTION_RESET_TIME = 10.f; @@ -1745,6 +1773,13 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level) return true; } +bool LLViewerFetchedTexture::isActiveFetching() +{ + static LLCachedControl<bool> monitor_enabled(gSavedSettings,"DebugShowTextureInfo"); + + return mFetchState > 7 && mFetchState < 10 && monitor_enabled; //in state of WAIT_HTTP_REQ or DECODE_IMAGE. +} + bool LLViewerFetchedTexture::updateFetch() { static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); @@ -1834,7 +1869,7 @@ bool LLViewerFetchedTexture::updateFetch() { //discard all oversized textures. destroyRawImage(); - llwarns << "oversize, setting as missing" << llendl; + LL_WARNS() << "oversize, setting as missing" << LL_ENDL; setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL ; mIsFetching = FALSE ; @@ -1864,16 +1899,16 @@ bool LLViewerFetchedTexture::updateFetch() // We finished but received no data if (current_discard < 0) { - llwarns << "!mIsFetching, setting as missing, decode_priority " << decode_priority + LL_WARNS() << "!mIsFetching, setting as missing, decode_priority " << decode_priority << " mRawDiscardLevel " << mRawDiscardLevel << " current_discard " << current_discard - << llendl; + << LL_ENDL; setIsMissingAsset(); desired_discard = -1; } else { - //llwarns << mID << ": Setting min discard to " << current_discard << llendl; + //LL_WARNS() << mID << ": Setting min discard to " << current_discard << LL_ENDL; mMinDiscardLevel = current_discard; desired_discard = current_discard; } @@ -1891,7 +1926,7 @@ bool LLViewerFetchedTexture::updateFetch() // // Useful debugging code for undesired deprioritization of textures. // if (decode_priority <= 0.0f && desired_discard >= 0 && desired_discard < current_discard) // { -// llinfos << "Calling updateRequestPriority() with decode_priority = 0.0f" << llendl; +// LL_INFOS() << "Calling updateRequestPriority() with decode_priority = 0.0f" << LL_ENDL; // calcDecodePriority(); // } static const F32 MAX_HOLD_TIME = 5.0f ; //seconds to wait before canceling fecthing if decode_priority is 0.f. @@ -2006,7 +2041,7 @@ bool LLViewerFetchedTexture::updateFetch() const F32 FETCH_IDLE_TIME = 5.f; if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME) { - LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << llendl; + LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << LL_ENDL; LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); mHasFetcher = FALSE; } @@ -2050,14 +2085,14 @@ void LLViewerFetchedTexture::setIsMissingAsset() { if (mUrl.empty()) { - llwarns << mID << ": Marking image as missing" << llendl; + LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL; } else { // This may or may not be an error - it is normal to have no // map tile on an empty region, but bad if we're failing on a // server bake texture. - llwarns << mUrl << ": Marking image as missing" << llendl; + LL_WARNS() << mUrl << ": Marking image as missing" << LL_ENDL; } if (mHasFetcher) { @@ -2112,7 +2147,7 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { // We need aux data, but we've already loaded the image, and it didn't have any - llwarns << "No aux data available for callback for image:" << getID() << llendl; + LL_WARNS() << "No aux data available for callback for image:" << getID() << LL_ENDL; } mLastCallBackActiveTime = sCurrentTime ; } @@ -2407,7 +2442,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (run_raw_callbacks && mIsRawImageValid && (mRawDiscardLevel <= getMaxDiscardLevel())) { // Do callbacks which require raw image data. - //llinfos << "doLoadedCallbacks raw for " << getID() << llendl; + //LL_INFOS() << "doLoadedCallbacks raw for " << getID() << LL_ENDL; // Call each party interested in the raw data. for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -2425,11 +2460,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() //llassert_always(mRawImage.notNull()); if(mNeedsAux && mAuxRawImage.isNull()) { - llwarns << "Raw Image with no Aux Data for callback" << llendl; + LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL; } BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE; - //llinfos << "Running callback for " << getID() << llendl; - //llinfos << mRawImage->getWidth() << "x" << mRawImage->getHeight() << llendl; + //LL_INFOS() << "Running callback for " << getID() << LL_ENDL; + //LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL; entryp->mLastUsedDiscard = mRawDiscardLevel; entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); if (final) @@ -2447,7 +2482,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // if (run_gl_callbacks && (gl_discard <= getMaxDiscardLevel())) { - //llinfos << "doLoadedCallbacks GL for " << getID() << llendl; + //LL_INFOS() << "doLoadedCallbacks GL for " << getID() << LL_ENDL; // Call the callbacks interested in GL data. for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -2925,13 +2960,13 @@ void LLViewerLODTexture::processTextureStats() scaleDown() ; } // Limit the amount of GL memory bound each frame - else if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale && + else if ( sBoundTextureMemory > sMaxBoundTextureMem * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { scaleDown() ; } // Only allow GL to have 2x the video card memory - else if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale && + else if ( sTotalTextureMemory > sMaxTotalTextureMem * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { scaleDown() ; @@ -3134,12 +3169,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) { @@ -3253,7 +3288,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) if(te && te->getID().notNull()) //should have a texture { - llerrs << "The face does not have a valid texture before media texture." << llendl ; + LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL ; } } @@ -3282,9 +3317,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()); @@ -3337,7 +3372,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) if(te && te->getID().notNull()) //should have a texture { - llerrs << "mTextureList texture reference number is corrupted." << llendl ; + LL_ERRS() << "mTextureList texture reference number is corrupted." << LL_ENDL ; } } @@ -3460,12 +3495,12 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() for(U32 i = 0 ; i < mNumFaces[ch] ; i++) { LLFace* facep = mFaceList[ch][i] ; - if(facep->getDrawable()->isRecentlyVisible()) - { - addTextureStats(facep->getVirtualSize()) ; - } - } - } + if(facep->getDrawable()->isRecentlyVisible()) + { + addTextureStats(facep->getVirtualSize()) ; + } + } + } } else //media is not in playing { @@ -3694,7 +3729,7 @@ void LLTexturePipelineTester::compareTestSessions(std::ofstream* os) LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp) ; if(!base_sessionp || !current_sessionp) { - llerrs << "type of test session does not match!" << llendl ; + LL_ERRS() << "type of test session does not match!" << LL_ENDL ; } //compare and output the comparison |