diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index eb11a6b32b..57807b57d2 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -199,13 +199,21 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); - if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + LLFloaterReporter* floater_reporter = (LLFloaterReporter*)user_data; + if (floater_reporter) { - mSnapshotTimer.stop(); - // Refresh screenshot button - //takeNewSnapshot(); - takeNewSnapshot(false); - // + static LLCachedControl screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); + if (floater_reporter->mSnapshotTimer.getStarted() && floater_reporter->mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + { + floater_reporter->mSnapshotTimer.stop(); + // Refresh screenshot button + //floater_reporter->takeNewSnapshot(); + floater_reporter->takeNewSnapshot(false); + // } } diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index ea07f7d368..139c8a9f86 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -83,7 +83,8 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - virtual void draw(); + + static void onIdle(void* user_data); void setReportType(EReportType type) { mReportType = type; } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 56d4b475b4..108174a0e5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -364,17 +364,27 @@ LLViewerInventoryCategory* LLInventoryModel::getCategory(const LLUUID& id) const bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const { + bool res = false; const LLViewerInventoryCategory* category = getCategory(id); if (category) { LLFolderType::EType cat_type = category->getPreferredType(); - // Show inbox folder depending on FSShowInboxFolder setting - //return (cat_type == LLFolderType::FT_INBOX || cat_type == LLFolderType::FT_OUTBOX); - static LLCachedControl fsShowInboxFolder(gSavedSettings, "FSShowInboxFolder"); - return ((cat_type == LLFolderType::FT_INBOX && !fsShowInboxFolder) || cat_type == LLFolderType::FT_OUTBOX); - // + switch (cat_type) + { + case LLFolderType::FT_INBOX: + // Show inbox folder depending on FSShowInboxFolder setting + static LLCachedControl fsShowInboxFolder(gSavedSettings, "FSShowInboxFolder"); + return !fsShowIndoxFolder; + // + case LLFolderType::FT_OUTBOX: + case LLFolderType::FT_MARKETPLACE_LISTINGS: + res = true; + break; + default: + break; + } } - return false; + return res; } S32 LLInventoryModel::getItemCount() const diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 839d023ee6..7a70b9c126 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -407,7 +407,11 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata) } else { - return mTempItemsList->hasSelectedItem(); + LLScrollListItem* item = mTempItemsList->getFirstSelected(); + if (item && item->getUUID().notNull()) + { + return true; + } } } @@ -600,7 +604,7 @@ void LLPanelWearing::onEditAttachment() void LLPanelWearing::onRemoveAttachment() { LLScrollListItem* item = mTempItemsList->getFirstSelected(); - if (item) + if (item && item->getUUID().notNull()) { LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]); diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 85491e20cf..2df37b370b 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -173,9 +173,9 @@ void LLTextureBar::draw() { color = LLColor4::green4; } - else if (mImagep->getBoostLevel() > LLGLTexture::BOOST_NONE) + else if (mImagep->getBoostLevel() > LLGLTexture::BOOST_ALM) { - color = LLColor4::magenta; + color = LLColor4::magenta; // except none and alm } else if (mImagep->getDecodePriority() <= 0.0f) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9e17d507bc..40b0d57d21 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4504,10 +4504,10 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry) if (getTE(te)->getMaterialParams().notNull()) { const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID(); - mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE); const LLUUID& spec_id = getTE(te)->getMaterialParams()->getSpecularID(); - mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE); } } @@ -4631,14 +4631,14 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid) S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTENormalMapCore(te, image); } S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTESpecularMapCore(te, image); } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4b439a99da..641c7fbfbd 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -774,6 +774,7 @@ void LLViewerTexture::setBoostLevel(S32 level) { mBoostLevel = level; if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_ALM && mBoostLevel != LLViewerTexture::BOOST_SELECTED && mBoostLevel != LLViewerTexture::BOOST_ICON) { @@ -1667,6 +1668,10 @@ void LLViewerFetchedTexture::processTextureStats() { mDesiredDiscardLevel = 0; } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mDontDiscard && mBoostLevel == LLGLTexture::BOOST_ICON) { if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) @@ -1959,8 +1964,9 @@ void LLViewerFetchedTexture::updateVirtualSize() { if(drawable->isRecentlyVisible()) { - if (getBoostLevel() == LLViewerTexture::BOOST_NONE && - drawable->getVObj() && drawable->getVObj()->isSelected()) + if ((getBoostLevel() == LLViewerTexture::BOOST_NONE || getBoostLevel() == LLViewerTexture::BOOST_ALM) + && drawable->getVObj() + && drawable->getVObj()->isSelected()) { setBoostLevel(LLViewerTexture::BOOST_SELECTED); } @@ -1977,6 +1983,7 @@ void LLViewerFetchedTexture::updateVirtualSize() if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) { + // Could have been BOOST_ALM, but if user was working with this texture, better keep it as NONE setBoostLevel(LLViewerTexture::BOOST_NONE); } @@ -2253,7 +2260,7 @@ bool LLViewerFetchedTexture::updateFetch() // Load the texture progressively: we try not to rush to the desired discard too fast. // If the camera is not moving, we do not tweak the discard level notch by notch but go to the desired discard with larger boosted steps // This mitigates the "textures stay blurry" problem when loading while not killing the texture memory while moving around - S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1; + S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_ALM) ? 2 : 1; if (current_discard < 0) { desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); @@ -3272,6 +3279,10 @@ void LLViewerLODTexture::processTextureStats() if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mBoostLevel < LLGLTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f) { // If the image has not been significantly visible in a while, we don't want it diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2f11a6dd6a..185b717e9e 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -507,6 +507,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, LLPointer imagep = findImage(image_id, get_element_type(boost_priority)); if (!imagep.isNull()) { + if (boost_priority != LLViewerTexture::BOOST_ALM && imagep->getBoostLevel() == LLViewerTexture::BOOST_ALM) + { + // Workaround: we need BOOST_ALM texture for something, 'rise' to NONE + imagep->setDecodePriority(LLViewerTexture::BOOST_NONE); + } + LLViewerFetchedTexture *texture = imagep.get(); if (request_from_host.isOk() && !texture->getTargetHost().isOk()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c77ecbcdaa..af737df80c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8176,13 +8176,11 @@ void LLVOAvatar::updateMeshTextures() debugColorizeSubMeshes(i,LLColor4::blue); } } - static LLUUID default_alpha_uuid = LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")); - bool hair_alpha_exists = (getImage(TEX_HAIR_ALPHA, 0) && getImage(TEX_HAIR_ALPHA, 0)->getID() != default_alpha_uuid); // set texture and color of hair manually if we are not using a baked image. // This can happen while loading hair for yourself, or for clients that did not // bake a hair texture. Still needed for yourself after 1.22 is depricated. - if (!is_layer_baked[BAKED_HAIR] || (isEditingAppearance() && !hair_alpha_exists)) + if (!is_layer_baked[BAKED_HAIR]) { const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 ); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 52efde86dc..456cdf76e0 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -700,7 +700,13 @@ void LLVivoxVoiceClient::voiceControlCoro() { mIsCoroutineActive = true; LLCoros::set_consuming(true); - + + while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + LL_INFOS("Voice") << "Suspending voiceControlCoro() due to teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; + llcoro::suspendUntilTimeout(1.0); + } + do { @@ -722,7 +728,7 @@ void LLVivoxVoiceClient::voiceControlCoro() // and then reconstruct the voice connecion from scratch. if (mRelogRequested) { - while (isGatewayRunning()) + while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) { llcoro::suspendUntilTimeout(1.0); } @@ -1413,7 +1419,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) mAudioSession = nextSession; mAudioSessionChanged = true; - if (!mAudioSession->mReconnect) + if (!mAudioSession || !mAudioSession->mReconnect) { mNextAudioSession.reset(); } @@ -1421,16 +1427,19 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) // The old session may now need to be deleted. reapSession(oldSession); - if (!mAudioSession->mHandle.empty()) + if (mAudioSession) { - // Connect to a session by session handle + if (!mAudioSession->mHandle.empty()) + { + // Connect to a session by session handle - sessionMediaConnectSendMessage(mAudioSession); - } - else - { - // Connect to a session by URI - sessionCreateSendMessage(mAudioSession, true, false); + sessionMediaConnectSendMessage(mAudioSession); + } + else + { + // Connect to a session by URI + sessionCreateSendMessage(mAudioSession, true, false); + } } notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); @@ -1495,6 +1504,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) LL_INFOS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("session")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initialized." << LL_ENDL; + continue; + } if (result.has("handle") && result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL; @@ -1838,6 +1852,11 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) { if (result.has("handle")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initiated." << LL_ENDL; + continue; + } if (result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 391aaeae03..3dba37a965 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -945,7 +945,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) { LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); LLUUID id = params->getLightTexture(); - mLightTexture = LLViewerTextureManager::getFetchedTexture(id); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM); if (mLightTexture.notNull()) { F32 rad = getLightRadius(); @@ -3275,7 +3275,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() { if (mLightTexture.isNull() || id != mLightTexture->getID()) { - mLightTexture = LLViewerTextureManager::getFetchedTexture(id); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM); } } else