From f26f1ca0f4545e695bfb731abd5d8c078de74e1f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 14 Jan 2016 17:26:17 +0200 Subject: MAINT-6042 FIXED Audio/Media automatically starts playing again after clicking "Stop All" --- indra/newview/llviewerparcelmgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerparcelmgr.cpp') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2a6b105cab..0f5b52c8d6 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1453,6 +1453,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use BOOL region_deny_identified_override = false; // Deprecated BOOL region_deny_transacted_override = false; // Deprecated BOOL region_deny_age_unverified_override = false; + BOOL changed_parcel = false; S32 other_clean_time = 0; @@ -1571,6 +1572,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (parcel == parcel_mgr.mAgentParcel) { // new agent parcel + changed_parcel = true; S32 bitmap_size = parcel_mgr.mParcelsPerEdge * parcel_mgr.mParcelsPerEdge / 8; @@ -1759,7 +1761,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLStringUtil::trim(music_url); // If there is a new music URL and it's valid, play it. - if (music_url.size() > 12) + const std::string& stream_url = gAudiop->getInternetStreamURL(); + if (music_url.size() > 12 && (music_url != stream_url || changed_parcel)) { if (music_url.substr(0,7) == "http://") { @@ -1773,7 +1776,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } } - else if (!gAudiop->getInternetStreamURL().empty()) + else if (!stream_url.empty()) { LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL; // null value causes fade out -- cgit v1.3 From dab96aad7f0af2017cb931eb4cdaf5367f835e29 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sun, 24 Jan 2016 23:54:46 +0200 Subject: MAINT-6042 FIXED Regular agent-parcel updates should not restart stopped audio --- indra/newview/llviewerparcelmgr.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerparcelmgr.cpp') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 0f5b52c8d6..e4d24823f7 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1453,7 +1453,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use BOOL region_deny_identified_override = false; // Deprecated BOOL region_deny_transacted_override = false; // Deprecated BOOL region_deny_age_unverified_override = false; - BOOL changed_parcel = false; + BOOL agent_teleported = false; S32 other_clean_time = 0; @@ -1572,7 +1572,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (parcel == parcel_mgr.mAgentParcel) { // new agent parcel - changed_parcel = true; S32 bitmap_size = parcel_mgr.mParcelsPerEdge * parcel_mgr.mParcelsPerEdge / 8; @@ -1590,6 +1589,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (instance->mTeleportInProgress) { + agent_teleported = true; instance->mTeleportInProgress = FALSE; if(instance->mTeleportInProgressPosition.isNull()) { @@ -1755,14 +1755,18 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (parcel) { std::string music_url_raw = parcel->getMusicURL(); + const std::string& stream_url = gAudiop->getInternetStreamURL(); // Trim off whitespace from front and back std::string music_url = music_url_raw; LLStringUtil::trim(music_url); - // If there is a new music URL and it's valid, play it. - const std::string& stream_url = gAudiop->getInternetStreamURL(); - if (music_url.size() > 12 && (music_url != stream_url || changed_parcel)) + static std::string last_url = ""; + + // If music url is valid and url is a new or teleport was performed - play music. + // If url is empty or not usable and there is stream playing - stop music + // In all other cases maintain previous state + if (music_url.size() > 12 && (music_url != last_url || agent_teleported)) { if (music_url.substr(0,7) == "http://") { @@ -1776,12 +1780,13 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } } - else if (!stream_url.empty()) + else if (!stream_url.empty() && (music_url != last_url || music_url.empty())) { LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL; // null value causes fade out LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } + last_url = music_url; } else { -- cgit v1.3 From 6c218c076b03b73a2c1e7dd68e8c875ea747395f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 25 Jan 2016 18:50:57 +0200 Subject: MAINT-6042 region crossing in any form should trigger music check --- indra/newview/llviewerparcelmgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerparcelmgr.cpp') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index e4d24823f7..abdbaaca03 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1756,17 +1756,22 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { std::string music_url_raw = parcel->getMusicURL(); const std::string& stream_url = gAudiop->getInternetStreamURL(); + LLUUID region_id = gAgent.getRegion()->getRegionID(); // Trim off whitespace from front and back std::string music_url = music_url_raw; LLStringUtil::trim(music_url); static std::string last_url = ""; + static LLUUID last_region_id = LLUUID::null; - // If music url is valid and url is a new or teleport was performed - play music. + // If music url is valid and url is a new or teleport/region cross was performed - play music. // If url is empty or not usable and there is stream playing - stop music // In all other cases maintain previous state - if (music_url.size() > 12 && (music_url != last_url || agent_teleported)) + if (music_url.size() > 12 + && (music_url != last_url + || agent_teleported + || last_region_id != region_id)) { if (music_url.substr(0,7) == "http://") { @@ -1787,6 +1792,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } last_url = music_url; + last_region_id = region_id; } else { -- cgit v1.3 From 3ae2ffad75c94c4c8034f11366b776abdb720158 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 1 Feb 2016 16:42:30 +0200 Subject: MAINT-6042 FIXED Audio/Media automatically starts playing again after clicking "Stop All" --- indra/newview/llviewerparcelmgr.cpp | 97 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 50 deletions(-) (limited to 'indra/newview/llviewerparcelmgr.cpp') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index abdbaaca03..e72ae88ba2 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1453,7 +1453,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use BOOL region_deny_identified_override = false; // Deprecated BOOL region_deny_transacted_override = false; // Deprecated BOOL region_deny_age_unverified_override = false; - BOOL agent_teleported = false; + BOOL agent_parcel_update = false; // updating previous(existing) agent parcel S32 other_clean_time = 0; @@ -1543,6 +1543,18 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use // Actually extract the data. if (parcel) { + if (local_id == parcel_mgr.mAgentParcel->getLocalID()) + { + // Parcels in different regions can have same ids. + LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender()); + LLViewerRegion* agent_region = gAgent.getRegion(); + if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID()) + { + // we got an updated version of agent parcel + agent_parcel_update = true; + } + } + parcel->init(owner_id, FALSE, FALSE, FALSE, claim_date, claim_price_per_meter, rent_price_per_meter, @@ -1589,7 +1601,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (instance->mTeleportInProgress) { - agent_teleported = true; instance->mTeleportInProgress = FALSE; if(instance->mTeleportInProgressPosition.isNull()) { @@ -1602,16 +1613,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } } } - else if (local_id == parcel_mgr.mAgentParcel->getLocalID()) + else if (agent_parcel_update) { - // Parcels in different regions can have same ids. - LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion( msg->getSender() ); - LLViewerRegion* agent_region = gAgent.getRegion(); - if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID()) - { - // updated agent parcel - parcel_mgr.mAgentParcel->unpackMessage(msg); - } + // updated agent parcel + parcel_mgr.mAgentParcel->unpackMessage(msg); } } @@ -1754,45 +1759,37 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { if (parcel) { - std::string music_url_raw = parcel->getMusicURL(); - const std::string& stream_url = gAudiop->getInternetStreamURL(); - LLUUID region_id = gAgent.getRegion()->getRegionID(); - - // Trim off whitespace from front and back - std::string music_url = music_url_raw; - LLStringUtil::trim(music_url); - - static std::string last_url = ""; - static LLUUID last_region_id = LLUUID::null; - - // If music url is valid and url is a new or teleport/region cross was performed - play music. - // If url is empty or not usable and there is stream playing - stop music - // In all other cases maintain previous state - if (music_url.size() > 12 - && (music_url != last_url - || agent_teleported - || last_region_id != region_id)) - { - if (music_url.substr(0,7) == "http://") - { - optionally_start_music(music_url); - } - else - { - LL_INFOS() << "Stopping parcel music (invalid audio stream URL)" << LL_ENDL; - // clears the URL - // null value causes fade out - LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); - } - } - else if (!stream_url.empty() && (music_url != last_url || music_url.empty())) - { - LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL; - // null value causes fade out - LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); - } - last_url = music_url; - last_region_id = region_id; + // Only update stream if parcel changed (recreated) or music is playing (enabled) + if (!agent_parcel_update || gSavedSettings.getBOOL("MediaTentativeAutoPlay")) + { + std::string music_url_raw = parcel->getMusicURL(); + + // Trim off whitespace from front and back + std::string music_url = music_url_raw; + LLStringUtil::trim(music_url); + + // If there is a new music URL and it's valid, play it. + if (music_url.size() > 12) + { + if (music_url.substr(0, 7) == "http://") + { + optionally_start_music(music_url); + } + else + { + LL_INFOS() << "Stopping parcel music (invalid audio stream URL)" << LL_ENDL; + // clears the URL + // null value causes fade out + LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); + } + } + else if (!gAudiop->getInternetStreamURL().empty()) + { + LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL; + // null value causes fade out + LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); + } + } } else { -- cgit v1.3 From 30f9287645c789b4ad5e9523e520896fe71ed65b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 3 Mar 2016 00:15:33 +0200 Subject: MAINT-2199 reverted previous change, refixed missing cloud and ban line --- indra/newview/lllocalbitmaps.cpp | 10 +++++----- indra/newview/llpanelface.cpp | 2 +- indra/newview/lltexturectrl.cpp | 2 +- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/llviewerparcelmgr.cpp | 4 ++-- indra/newview/llviewertexture.cpp | 14 +++++++------- indra/newview/llviewertexturelist.cpp | 17 +++++++++-------- indra/newview/llviewertexturelist.h | 4 ++-- indra/newview/llvoavatar.cpp | 8 ++++---- 9 files changed, 32 insertions(+), 31 deletions(-) (limited to 'indra/newview/llviewerparcelmgr.cpp') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index aa934f95a1..366b9ac034 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -135,7 +135,7 @@ LLLocalBitmap::~LLLocalBitmap() } // delete self from gimagelist - LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_STANDARD); + LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_DISCARD); gTextureList.deleteImage(image); if (image) @@ -207,7 +207,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image); texture->ref(); - gTextureList.addImage(texture, TEX_LIST_STANDARD); + gTextureList.addImage(texture, TEX_LIST_DISCARD); if (optional_firstupdate != UT_FIRSTUSE) { @@ -215,7 +215,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) replaceIDs(old_id, mWorldID); // remove old_id from gimagelist - LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_STANDARD); + LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_DISCARD); if (image != NULL) { gTextureList.deleteImage(image); @@ -384,7 +384,7 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id) std::vector LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32 channel) { std::vector obj_list; - LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD); + LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD); for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++) { @@ -502,7 +502,7 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel) void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id) { - LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD); + LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD); for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++) { LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter]; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ec2d37c30d..551495c6ad 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2214,7 +2214,7 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical) LLTextureEntry *te = object->getTE(te_index); if (te) { - LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL; + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL; if(!tex) { tex = LLViewerFetchedTexture::sDefaultImagep; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index e5aa740a33..980810835e 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1393,7 +1393,7 @@ void LLTextureCtrl::setOnTextureSelectedCallback(texture_selected_callback cb) void LLTextureCtrl::setImageAssetName(const std::string& name) { - LLPointer imagep = LLUI::getUIImage(name, LLGLTexture::BOOST_PREVIEW); + LLPointer imagep = LLUI::getUIImage(name); if(imagep) { LLViewerFetchedTexture* pTexture = dynamic_cast(imagep->getImage().get()); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index bb93597651..27d754bed2 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -4460,7 +4460,7 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) mRefetchedAllData += worker->mFormattedImage->getDataSize(); // refetch list only requests/creates normal images, so requesting ui='false' - LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_STANDARD); + LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_DISCARD); if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end()) { if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index e72ae88ba2..aafb6b4d12 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -143,8 +143,8 @@ LLViewerParcelMgr::LLViewerParcelMgr() // JC: Resolved a merge conflict here, eliminated // mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP); // because it is done in llviewertexturelist.cpp - mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png"); - mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png"); + mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI); + mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI); S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS; sPackedOverlay = new U8[overlay_size]; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9e730112ad..e2b8ff8e80 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3322,7 +3322,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL setCategory(LLGLTexture::MEDIA); - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); if(tex) //this media is a parcel media for tex. { tex->setParcelMedia(this); @@ -3332,7 +3332,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL //virtual LLViewerMediaTexture::~LLViewerMediaTexture() { - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); if(tex) //this media is a parcel media for tex. { tex->setParcelMedia(NULL); @@ -3387,7 +3387,7 @@ BOOL LLViewerMediaTexture::findFaces() BOOL ret = TRUE; - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); if(tex) //this media is a parcel media for tex. { for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) @@ -3496,7 +3496,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD); + LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD); if(tex) { mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it. @@ -3525,7 +3525,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD); + LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD); if(tex) { for(std::list< LLPointer >::iterator iter = mTextureList.begin(); @@ -3634,10 +3634,10 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te) { - LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL; + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL; if(!tex && te->getID() != mID)//try parcel media. { - tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); + tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); } if(!tex) { diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 21991fe2f7..fc6eabd651 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -72,18 +72,20 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); ETexListType get_element_type(S32 priority) { - if (priority == LLViewerFetchedTexture::BOOST_ICON) + // don't discard flag can be used in some cases, but it usually is not set yet + if (priority == LLViewerFetchedTexture::BOOST_ICON + || priority == LLViewerFetchedTexture::BOOST_UI) { - return TEX_LIST_SCALE; + return TEX_LIST_UI; } - return TEX_LIST_STANDARD; + return TEX_LIST_DISCARD; } /////////////////////////////////////////////////////////////////////////////// LLTextureKey::LLTextureKey() : textureId(LLUUID::null), -textureType(TEX_LIST_STANDARD) +textureType(TEX_LIST_DISCARD) { } @@ -577,7 +579,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector &output) { - LLTextureKey search_key(image_id, TEX_LIST_STANDARD); + LLTextureKey search_key(image_id, TEX_LIST_DISCARD); uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key); while (iter != mUUIDMap.end() && iter->first.textureId == image_id) { @@ -1583,14 +1585,14 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); - LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_STANDARD); + LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_DISCARD); if( image ) { LL_WARNS() << "Image not in db" << LL_ENDL; image->setIsMissingAsset(); } - image = gTextureList.findImage(image_id, TEX_LIST_SCALE); + image = gTextureList.findImage(image_id, TEX_LIST_UI); if (image) { LL_WARNS() << "Icon not in db" << LL_ENDL; @@ -1677,7 +1679,6 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st //don't compress UI images imagep->getGLTexture()->setAllowCompression(false); - LLUIImagePtr new_imagep = new LLUIImage(name, imagep); new_imagep->setScaleStyle(scale_style); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 53ea3e05a0..9f94f2f1bc 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -61,8 +61,8 @@ typedef void (*LLImageCallback)(BOOL success, enum ETexListType { - TEX_LIST_STANDARD = 0, - TEX_LIST_SCALE // images that will be scaled, they should not be mixed up with regular images + TEX_LIST_DISCARD = 0, + TEX_LIST_UI }; struct LLTextureKey diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6ac143660b..4efad480f1 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1992,7 +1992,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU uuid == IMG_INVISIBLE) { // Should already exist, don't need to find it on sim or baked-texture host. - result = gTextureList.findImage(uuid, TEX_LIST_STANDARD); + result = gTextureList.findImage(uuid, TEX_LIST_DISCARD); } if (!result) { @@ -4313,7 +4313,7 @@ bool LLVOAvatar::allTexturesCompletelyDownloaded(std::set& ids) const { for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); if (imagep && imagep->getDiscardLevel()!=0) { return false; @@ -4385,7 +4385,7 @@ S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) S32Bytes result(0); for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); if (imagep) { result += imagep->getTextureMemory(); @@ -4473,7 +4473,7 @@ void LLVOAvatar::releaseOldTextures() { if (new_texture_ids.find(*it) == new_texture_ids.end()) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); if (imagep) { current_texture_mem += imagep->getTextureMemory(); -- cgit v1.3