summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llinventory.cpp2
-rw-r--r--indra/llmath/llmath.h2
-rw-r--r--indra/llmath/v2math.h4
-rw-r--r--indra/llmath/v3math.h10
-rw-r--r--indra/llmath/v4math.h4
-rw-r--r--indra/llui/llfolderviewitem.cpp4
-rw-r--r--indra/llwindow/llwindowwin32.cpp112
-rw-r--r--indra/newview/llagentcamera.cpp2
-rw-r--r--indra/newview/llagentcamera.h4
-rw-r--r--indra/newview/llappearancemgr.cpp2
-rw-r--r--indra/newview/llfloaterobjectweights.h8
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp2
-rw-r--r--indra/newview/llinspecttexture.cpp17
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llinventoryfilter.cpp8
-rw-r--r--indra/newview/llinventorypanel.cpp8
-rw-r--r--indra/newview/lllocalbitmaps.cpp2
-rw-r--r--indra/newview/llmeshrepository.cpp4
-rw-r--r--indra/newview/lloutfitgallery.cpp8
-rw-r--r--indra/newview/lloutfitslist.cpp14
-rw-r--r--indra/newview/llpaneloutfitsinventory.h2
-rw-r--r--indra/newview/llpanelwearing.cpp4
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp4
-rw-r--r--indra/newview/llviewertexture.cpp17
-rw-r--r--indra/newview/llvoavatar.cpp80
-rw-r--r--indra/newview/llvoavatar.h2
26 files changed, 127 insertions, 201 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 14abf76eb9..16c112d411 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1029,7 +1029,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
<integer> 1 </key>
*/
continue;
- }
+ }
if (i->first == INV_THUMBNAIL_ID_LABEL)
{
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index fa315291a3..f5e9cdc7e4 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -75,7 +75,7 @@ constexpr F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
constexpr F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
constexpr F32 F_APPROXIMATELY_ZERO = 0.00001f;
constexpr F32 F_LN10 = 2.3025850929940456840179914546844f;
-constexpr F32 OO_LN10 = 0.43429448190325182765112891891661;
+constexpr F32 OO_LN10 = 0.43429448190325182765112891891661f;
constexpr F32 F_LN2 = 0.69314718056f;
constexpr F32 OO_LN2 = 1.4426950408889634073599246810019f;
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h
index b06739f122..6f2136139a 100644
--- a/indra/llmath/v2math.h
+++ b/indra/llmath/v2math.h
@@ -212,7 +212,7 @@ inline void LLVector2::setVec(const F32 *vec)
inline F32 LLVector2::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
inline F32 LLVector2::lengthSquared() const
@@ -304,7 +304,7 @@ inline LLVector2 operator-(const LLVector2& a, const LLVector2& b)
inline F32 operator*(const LLVector2& a, const LLVector2& b)
{
- return (a.mV[VX]*b.mV[VX] + a.mV[VY]*b.mV[VY]);
+ return a.mV[VX]*b.mV[VX] + a.mV[VY]*b.mV[VY];
}
inline LLVector2 operator%(const LLVector2& a, const LLVector2& b)
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index bcd8f311a8..c51c3bd316 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -233,7 +233,7 @@ inline void LLVector3::set(F32 x, F32 y, F32 z)
inline void LLVector3::set(const LLVector3& vec)
{
- set(vec.mV[0], vec.mV[1], vec.mV[2]);
+ set(vec.mV[VX], vec.mV[VY], vec.mV[VZ]);
}
inline void LLVector3::set(const F32* vec)
@@ -285,10 +285,10 @@ inline F32 LLVector3::normVec()
inline F32 LLVector3::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
-inline F32 LLVector3::lengthSquared(void) const
+inline F32 LLVector3::lengthSquared() const
{
return mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ];
}
@@ -412,9 +412,7 @@ inline const LLVector3& operator*=(LLVector3& a, const LLVector3& b)
inline const LLVector3& operator/=(LLVector3& a, F32 k)
{
- a.mV[VX] /= k;
- a.mV[VY] /= k;
- a.mV[VZ] /= k;
+ a *= 1.f / k;
return a;
}
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index b906ae24fd..4f36dc6533 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -298,7 +298,7 @@ inline void LLVector4::setVec(const F32* vec)
inline F32 LLVector4::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
inline F32 LLVector4::lengthSquared() const
@@ -436,7 +436,7 @@ inline LLVector4 lerp(const LLVector4& a, const LLVector4& b, F32 u)
inline F32 LLVector4::normalize()
{
- F32 mag = (F32) sqrt(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]);
+ F32 mag = sqrt(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]);
if (mag > FP_MAG_THRESHOLD)
{
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 477e0bc492..eff276d8c6 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -200,10 +200,6 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
{
mViewModelItem->setFolderViewItem(this);
}
- if (mViewModelItem)
- {
- mViewModelItem->setFolderViewItem(this);
- }
}
// Destroys the object
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f0b099df41..9494eee46d 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -344,12 +344,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
void run() override;
- // Detroys handles and window
- // Either post to or call from window thread
- void destroyWindow();
-
- // Closes queue, wakes thread, waits until thread closes.
- // Call from main thread
+ // closes queue, wakes thread, waits until thread closes
bool wakeAndDestroy();
void glReady()
@@ -407,7 +402,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
// until after some graphics setup. See SL-20177. -Cosmic,2023-09-18
bool mGLReady = false;
bool mGotGLBuffer = false;
- LLAtomicBool mDeleteOnExit = false;
+ bool mDeleteOnExit = false;
};
@@ -4790,48 +4785,17 @@ void LLWindowWin32::LLWindowWin32Thread::run()
#endif
}
- destroyWindow();
-
if (mDeleteOnExit)
{
delete this;
}
}
-void LLWindowWin32::LLWindowWin32Thread::destroyWindow()
-{
- if (mWindowHandleThrd != NULL && IsWindow(mWindowHandleThrd))
- {
- if (mhDCThrd)
- {
- if (!ReleaseDC(mWindowHandleThrd, mhDCThrd))
- {
- LL_WARNS("Window") << "Release of ghDC failed!" << LL_ENDL;
- }
- mhDCThrd = NULL;
- }
-
- // This causes WM_DESTROY to be sent *immediately*
- if (!destroy_window_handler(mWindowHandleThrd))
- {
- LL_WARNS("Window") << "Failed to destroy Window! " << std::hex << GetLastError() << LL_ENDL;
- }
- }
- else
- {
- // Something killed the window while we were busy destroying gl or handle somehow got broken
- LL_WARNS("Window") << "Failed to destroy Window, invalid handle!" << LL_ENDL;
- }
- mWindowHandleThrd = NULL;
- mhDCThrd = NULL;
- mGLReady = false;
-}
-
bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()
{
if (mQueue->isClosed())
{
- LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." <<LL_ENDL;
+ LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." << LL_ENDL;
return false;
}
@@ -4842,6 +4806,35 @@ bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()
// Schedule destruction
HWND old_handle = mWindowHandleThrd;
+ post([this]()
+ {
+ if (IsWindow(mWindowHandleThrd))
+ {
+ if (mhDCThrd)
+ {
+ if (!ReleaseDC(mWindowHandleThrd, mhDCThrd))
+ {
+ LL_WARNS("Window") << "Release of ghDC failed!" << LL_ENDL;
+ }
+ mhDCThrd = NULL;
+ }
+
+ // This causes WM_DESTROY to be sent *immediately*
+ if (!destroy_window_handler(mWindowHandleThrd))
+ {
+ LL_WARNS("Window") << "Failed to destroy Window! " << std::hex << GetLastError() << LL_ENDL;
+ }
+ }
+ else
+ {
+ // Something killed the window while we were busy destroying gl or handle somehow got broken
+ LL_WARNS("Window") << "Failed to destroy Window, invalid handle!" << LL_ENDL;
+ }
+ mWindowHandleThrd = NULL;
+ mhDCThrd = NULL;
+ mGLReady = false;
+ });
+
mDeleteOnExit = true;
SetWindowLongPtr(old_handle, GWLP_USERDATA, NULL);
@@ -4865,47 +4858,6 @@ bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()
PostMessage(old_handle, WM_DUMMY_, wparam, 0x1337);
}
- // There are cases where window will refuse to close,
- // can't wait forever on join, check state instead
- LLTimer timeout;
- timeout.setTimerExpirySec(2.0);
- while (!getQueue().done() && !timeout.hasExpired() && mWindowHandleThrd)
- {
- ms_sleep(100);
- }
-
- if (getQueue().done() || mWindowHandleThrd == NULL)
- {
- // Window is closed, started closing or is cleaning up
- // now wait for our single thread to die.
- if (mWindowHandleThrd)
- {
- LL_INFOS("Window") << "Window is closing, waiting on pool's thread to join, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL;
- }
- else
- {
- LL_DEBUGS("Window") << "Waiting on pool's thread, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL;
- }
- for (auto& pair : mThreads)
- {
- pair.second.join();
- }
- }
- else
- {
- // Something suspended window thread, can't afford to wait forever
- // so kill thread instead
- // Ex: This can happen if user starts dragging window arround (if it
- // was visible) or a modal notification pops up
- LL_WARNS("Window") << "Window is frozen, couldn't perform clean exit" << LL_ENDL;
-
- for (auto& pair : mThreads)
- {
- // very unsafe
- TerminateThread(pair.second.native_handle(), 0);
- pair.second.detach();
- }
- }
LL_DEBUGS("Window") << "thread pool shutdown complete" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 339656089c..7f60b2b8a0 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1231,7 +1231,7 @@ void LLAgentCamera::updateCamera()
}
//NOTE - this needs to be integrated into a general upVector system here within llAgent.
- if ( camera_mode == CAMERA_MODE_FOLLOW && mFocusOnAvatar )
+ if (camera_mode == CAMERA_MODE_FOLLOW && mFocusOnAvatar)
{
mCameraUpVector = mFollowCam.getUpVector();
}
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index feb396d840..d277fd6158 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -139,12 +139,12 @@ private:
//--------------------------------------------------------------------
public:
LLVector3d getCameraPositionGlobal() const;
- const LLVector3 &getCameraPositionAgent() const;
+ const LLVector3& getCameraPositionAgent() const;
LLVector3d calcCameraPositionTargetGlobal(bool *hit_limit = NULL); // Calculate the camera position target
F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters
void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; }
bool calcCameraMinDistance(F32 &obj_min_distance);
- F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); }
+ F32 getCurrentCameraBuildOffset() const { return (F32)mCameraFocusOffset.length(); }
void clearCameraLag() { mCameraLag.clearVec(); }
const LLVector3& getCameraUpVector() const { return mCameraUpVector; }
private:
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index b6e59f5d2e..eae5aa36e0 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2062,7 +2062,7 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_t
{
if (warn_on_type_mismatch)
{
- LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
+ LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
}
return false;
}
diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h
index c7e4b8431d..0ae78faf48 100644
--- a/indra/newview/llfloaterobjectweights.h
+++ b/indra/newview/llfloaterobjectweights.h
@@ -58,12 +58,12 @@ public:
LLFloaterObjectWeights(const LLSD& key);
~LLFloaterObjectWeights();
- /*virtual*/ bool postBuild();
+ bool postBuild() override;
- /*virtual*/ void onOpen(const LLSD& key);
+ void onOpen(const LLSD& key) override;
- /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost);
- /*virtual*/ void setErrorStatus(S32 status, const std::string& reason);
+ void onWeightsUpdate(const SelectionCost& selection_cost) override;
+ void setErrorStatus(S32 status, const std::string& reason) override;
void draw();
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 58132299de..9223c13ec1 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -248,7 +248,7 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
return continue_filtering;
}
-bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
+bool LLFolderViewModelItemInventory::filter(LLFolderViewFilter& filter)
{
const S32 filter_generation = filter.getCurrentGeneration();
const S32 must_pass_generation = filter.getFirstRequiredGeneration();
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index 947ee4200d..0482befdcb 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -115,7 +115,6 @@ public:
protected:
LLPointer<LLViewerFetchedTexture> m_Image;
- S32 mImageBoostLevel = LLGLTexture::BOOST_NONE;
std::string mLoadingText;
};
@@ -128,11 +127,7 @@ LLTexturePreviewView::LLTexturePreviewView(const LLView::Params& p)
LLTexturePreviewView::~LLTexturePreviewView()
{
- if (m_Image)
- {
- m_Image->setBoostLevel(mImageBoostLevel);
- m_Image = nullptr;
- }
+ m_Image = nullptr;
}
void LLTexturePreviewView::draw()
@@ -153,19 +148,19 @@ void LLTexturePreviewView::draw()
bool isLoading = (!m_Image->isFullyLoaded()) && (m_Image->getDiscardLevel() > 0);
if (isLoading)
LLFontGL::getFontSansSerif()->renderUTF8(mLoadingText, 0, rctClient.mLeft + 3, rctClient.mTop - 25, LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
- m_Image->addTextureStats((isLoading) ? MAX_IMAGE_AREA : (F32)(rctClient.getWidth() * rctClient.getHeight()));
+
+ m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
}
}
void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset)
{
- m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_THUMBNAIL);
if (m_Image)
{
- mImageBoostLevel = m_Image->getBoostLevel();
- m_Image->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
m_Image->forceToSaveRawImage(0);
- if ( (!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()) )
+ m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
+ if ((!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()))
{
if (m_Image->isInFastCacheList())
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 7b975a2154..9a38355858 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2310,7 +2310,7 @@ bool LLItemBridge::isFavorite() const
{
LLViewerInventoryItem* item = NULL;
LLInventoryModel* model = getInventoryModel();
- if(model)
+ if (model)
{
item = model->getItem(mUUID);
}
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 78bff79854..99c2d6e410 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -645,10 +645,10 @@ bool LLInventoryFilter::checkAgainstFilterFavorites(const LLUUID& object_id) con
if (mFilterOps.mFilterFavorites != FILTER_INCLUDE_FAVORITES)
{
bool is_favorite = get_is_favorite(object);
- if (is_favorite && (mFilterOps.mFilterFavorites == FILTER_EXCLUDE_FAVORITES))
- return false;
- if (!is_favorite && (mFilterOps.mFilterFavorites == FILTER_ONLY_FAVORITES))
- return false;
+ if (is_favorite && (mFilterOps.mFilterFavorites == FILTER_EXCLUDE_FAVORITES))
+ return false;
+ if (!is_favorite && (mFilterOps.mFilterFavorites == FILTER_ONLY_FAVORITES))
+ return false;
}
return true;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 69c8cb4747..04abc5e5f4 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -755,10 +755,10 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
{
updateFolderLabel(viewmodel_folder->getUUID());
}
- if (view_item->isFavorite())
- {
- parent->updateHasFavorites(false); // favorite was removed
- }
+ }
+ if (view_item->isFavorite())
+ {
+ parent->updateHasFavorites(false); // favorite was removed
}
}
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 81b2d23cf7..4d54eac2ba 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -673,7 +673,7 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id)
LLFetchedGLTFMaterial* render_mat = dynamic_cast<LLFetchedGLTFMaterial*>(entry->getGLTFRenderMaterial());
if (render_mat)
{
- *render_mat = *fetched_mat;
+ *render_mat = *fetched_mat;
render_mat->applyOverride(*override_mat);
}
else
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 06a327c56a..e2471ca76a 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2309,8 +2309,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, std::vector<std::string>&
LLSD res;
if (mDestinationFolderId.isNull())
{
- result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT);
- result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE);
+ result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT);
+ result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE);
}
else
{
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index adf9cd3518..489be091d1 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1273,15 +1273,7 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
- mMenu->setItemVisible("expand", false);
- mMenu->setItemVisible("collapse", false);
mMenu->setItemVisible("thumbnail", have_selection);
- mMenu->setItemVisible("inventory_settings", false);
- mMenu->setItemVisible("inv_settings_separator", false);
- mMenu->setItemVisible("sort_order_separator", true);
- mMenu->setItemVisible("sort_order_by_image", true);
- mMenu->setItemVisible("sepatator3", true);
- mMenu->setItemVisible("sort_folders_by_name", true);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 13bd270f7b..a7fda4b9d3 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -1151,12 +1151,6 @@ void LLOutfitListBase::ChangeOutfitSelection(LLWearableItemsList* list, const LL
bool LLOutfitListBase::postBuild()
{
- mGearMenu = createGearMenu();
-
- LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
-
- menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu));
- menu_gear_btn->setMenu(mGearMenu->getMenu());
return true;
}
@@ -1515,16 +1509,8 @@ LLOutfitListGearMenu::~LLOutfitListGearMenu()
void LLOutfitListGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
- mMenu->setItemVisible("expand", true);
- mMenu->setItemVisible("collapse", true);
mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
mMenu->setItemVisible("favorite", getSelectedOutfitID().notNull());
- mMenu->setItemVisible("inventory_settings", true);
- mMenu->setItemVisible("inv_settings_separator", true);
- mMenu->setItemVisible("sort_order_separator", false);
- mMenu->setItemVisible("sort_order_by_image", false);
- mMenu->setItemVisible("sepatator3", false);
- mMenu->setItemVisible("sort_folders_by_name", false);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 59cfcc75ba..29f7eb44f7 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -101,7 +101,6 @@ protected:
void initListCommandsHandlers();
void updateListCommands();
void onWearButtonClick();
- void showGearMenu();
void onTrashButtonClick();
void onGearMouseDown();
bool isActionEnabled(const LLSD& userdata);
@@ -110,7 +109,6 @@ protected:
void onWearablesLoading();
private:
LLPanel* mListCommands;
- LLMenuGL* mMenuAdd;
LLButton* mWearBtn = nullptr;
// List Commands //
//////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 52a040eb17..b4f6db9287 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -263,10 +263,6 @@ bool LLPanelWearing::postBuild()
mTempItemsList->setFgUnselectedColor(LLColor4::white);
mTempItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onTempAttachmentsListRightClick, this, _1, _2, _3));
- LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
-
- menu_gear_btn->setMenu(mGearMenu->getMenu());
-
return true;
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index f952d74a4b..8998d61c47 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -342,10 +342,10 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
GP_OBJECT_MANIPULATE)
&& is_obj_modify && is_complete && not_in_trash;
- getChildView("LabelItemNameTitle")->setEnabled(TRUE);
+ getChildView("LabelItemNameTitle")->setEnabled(true);
getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());
- getChildView("LabelItemDescTitle")->setEnabled(TRUE);
+ getChildView("LabelItemDescTitle")->setEnabled(true);
getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID());
// Asset upload substitutes empty description with a (No Description) placeholder
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a65e967013..6953407f75 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2057,6 +2057,7 @@ bool LLViewerFetchedTexture::updateFetch()
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created");
mHasFetcher = true;
mIsFetching = true;
+ mLastWorkerDiscardLevel = worker_discard;
// in some cases createRequest can modify discard, as an example
// bake textures are always at discard 0
mRequestedDiscardLevel = llmin(desired_discard, worker_discard);
@@ -2652,6 +2653,8 @@ void LLViewerFetchedTexture::saveRawImage()
return;
}
+ LLImageDataSharedLock lock(mRawImage);
+
mSavedRawDiscardLevel = mRawDiscardLevel;
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
@@ -2667,13 +2670,25 @@ void LLViewerFetchedTexture::saveRawImage()
mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
}
}
+ else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ {
+ if (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)
+ {
+ mSavedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, mRawImage->getComponents());
+ mSavedRawImage->copyScaled(mRawImage);
+ }
+ else
+ {
+ mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
+ }
+ }
else if (mBoostLevel == LLGLTexture::BOOST_SCULPTED)
{
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : sMaxSculptRez;
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : sMaxSculptRez;
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
{
- mSavedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, mRawImage->getComponents());
+ mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
mSavedRawImage->copyScaled(mRawImage);
}
else
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 52d6740fe5..8b7d284259 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -684,6 +684,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mPreviousFullyLoaded(false),
mFullyLoadedInitialized(false),
mLastCloudAttachmentCount(0),
+ mFullyLoadedFrameCounter(0),
mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mLoadedCallbacksPaused(false),
mLoadedCallbackTextures(0),
@@ -967,7 +968,7 @@ bool LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
++grey_avatars;
}
}
- return !grey_avatars;
+ return grey_avatars == 0;
}
// static
@@ -3183,17 +3184,17 @@ F32 LLVOAvatar::calcMorphAmount() const
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
{
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
- if ( voice_enabled
+ if (voice_enabled
&& mLastRezzedStatus > 0 // no point updating lip-sync for clouds
&& LLVoiceVisualizer::getLipSyncEnabled()
- && LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
+ && LLVoiceClient::getInstance()->getIsSpeaking(mID))
{
F32 ooh_morph_amount = 0.0f;
F32 aah_morph_amount = 0.0f;
mVoiceVisualizer->lipSyncOohAah( ooh_morph_amount, aah_morph_amount );
- if( mOohMorph )
+ if (mOohMorph)
{
F32 ooh_weight = mOohMorph->getMinWeight()
+ ooh_morph_amount * (mOohMorph->getMaxWeight() - mOohMorph->getMinWeight());
@@ -3201,7 +3202,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
mOohMorph->setWeight( ooh_weight);
}
- if( mAahMorph )
+ if (mAahMorph)
{
F32 aah_weight = mAahMorph->getMinWeight()
+ aah_morph_amount * (mAahMorph->getMaxWeight() - mAahMorph->getMinWeight());
@@ -8218,7 +8219,7 @@ bool LLVOAvatar::getIsCloud() const
void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
{
// State machine for rezzed status. Statuses are -1 on startup, 0
- // = cloud, 1 = gray, 2 = downloading, 3 = waiting for attachments, 4 = full.
+ // Statuses are -1 on startup, 0 = cloud, 1 = gray, 2 = downloading, 3 = waiting for attachments, 4 = full.
// Purpose is to collect time data for each it takes avatar to reach
// various loading landmarks: gray, textured (partial), textured fully.
@@ -8406,7 +8407,7 @@ bool LLVOAvatar::updateIsFullyLoaded()
// avatars are more time-sensitive than textures and can't wait that long.
|| (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC)
|| !mPendingAttachment.empty()
- || (rez_status < 4 && !isFullyBaked())
+ || (rez_status < 3 && !isFullyBaked())
|| hasPendingAttachedMeshes()
);
@@ -8467,48 +8468,45 @@ void LLVOAvatar::updateRuthTimer(bool loading)
bool LLVOAvatar::processFullyLoadedChange(bool loading)
{
+ // We wait a little bit before giving the 'all clear', to let things to
+ // settle down: models to snap into place, textures to get first packets,
+ // LODs to load.
+ const F32 LOADED_DELAY = 1.f;
+
if (loading)
{
mFullyLoadedTimer.reset();
- mFullyLoaded = false;
}
- else if (!mFullyLoaded)
- {
- // We wait a little bit before giving the 'all clear', to let things to
- // settle down: models to snap into place, textures to get first packets,
- // LODs to load.
- const F32 LOADED_DELAY = 1.f;
- if (mFirstFullyVisible)
+ if (mFirstFullyVisible)
+ {
+ F32 first_use_delay = FIRST_APPEARANCE_CLOUD_MIN_DELAY;
+ if (!isSelf() && loading)
{
- F32 first_use_delay = FIRST_APPEARANCE_CLOUD_MIN_DELAY;
- if (!isSelf() && loading)
- {
- // Note that textures can causes 60s delay on thier own
- // so this delay might end up on top of textures' delay
- first_use_delay = llclamp(
- mFirstAppearanceMessageTimer.getElapsedTimeF32(),
- FIRST_APPEARANCE_CLOUD_MIN_DELAY,
- FIRST_APPEARANCE_CLOUD_MAX_DELAY);
+ // Note that textures can causes 60s delay on thier own
+ // so this delay might end up on top of textures' delay
+ first_use_delay = llclamp(
+ mFirstAppearanceMessageTimer.getElapsedTimeF32(),
+ FIRST_APPEARANCE_CLOUD_MIN_DELAY,
+ FIRST_APPEARANCE_CLOUD_MAX_DELAY);
- if (shouldImpostor())
- {
- // Impostors are less of a priority,
- // let them stay cloud longer
- first_use_delay *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER;
- }
+ if (shouldImpostor())
+ {
+ // Impostors are less of a priority,
+ // let them stay cloud longer
+ first_use_delay *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER;
}
- mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > first_use_delay);
- }
- else
- {
- mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY);
}
+ mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > first_use_delay);
+ }
+ else
+ {
+ mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY);
+ }
- if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
- {
- debugAvatarRezTime("AvatarRezNotification", "fully loaded");
- }
+ if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
+ {
+ debugAvatarRezTime("AvatarRezNotification", "fully loaded");
}
// did our loading state "change" from last call?
@@ -8517,8 +8515,8 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
const S32 UPDATE_RATE = 30;
bool changed =
((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call
- (!mFullyLoadedInitialized) || // if we've never been called before
- (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change
+ (!mFullyLoadedInitialized) || // if we've never been called before
+ (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change
bool fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);
mPreviousFullyLoaded = mFullyLoaded;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 6cdf50efea..d377ebad41 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -741,7 +741,7 @@ protected:
LLViewerTexLayerSet* getTexLayerSet(const U32 index) const { return dynamic_cast<LLViewerTexLayerSet*>(mBakedTextureDatas[index].mTexLayerSet); }
- LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
+ LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList;
bool mLoadedCallbacksPaused;
S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList
LLFrameTimer mLastTexCallbackAddedTime;