diff options
26 files changed, 251 insertions, 167 deletions
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 6143ec8cd1..0b9b148463 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -119,6 +119,8 @@ public: virtual void addDebugText( const std::string& text ) = 0; + virtual std::string getDebugName() const { return getID().asString(); } + virtual const LLUUID& getID() const = 0; //------------------------------------------------------------------------- // End Interface diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 5f51f40232..4ff56ae8c8 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -79,6 +79,15 @@ std::string LLDate::asRFC1123() const return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT")); } +std::string LLDate::toLocalDateString (std::string fmt) const +{ + LL_PROFILE_ZONE_SCOPED; + + time_t locSeconds = (time_t) mSecondsSinceEpoch; + struct tm * lt = localtime (&locSeconds); + return toHTTPDateString(lt, fmt); +} + std::string LLDate::toHTTPDateString (std::string fmt) const { LL_PROFILE_ZONE_SCOPED; diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 0afe0b0599..534b660689 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -79,6 +79,7 @@ public: std::string asRFC1123() const; void toStream(std::ostream&) const; bool split(S32 *year, S32 *month = NULL, S32 *day = NULL, S32 *hour = NULL, S32 *min = NULL, S32 *sec = NULL) const; + std::string toLocalDateString (std::string fmt) const; std::string toHTTPDateString (std::string fmt) const; static std::string toHTTPDateString (tm * gmt, std::string fmt); /** diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h index 2748d7b073..dfd7df4290 100644 --- a/indra/llcommon/threadpool.h +++ b/indra/llcommon/threadpool.h @@ -56,7 +56,7 @@ namespace LL * ThreadPool listens for application shutdown events. Call close() to * shut down this ThreadPool early. */ - virtual void close(); + void close(); std::string getName() const { return mName; } size_t getWidth() const { return mThreads.size(); } diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index f8294f063f..fb3363dad1 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -343,10 +343,9 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool LLWindowWin32Thread(); void run() override; - void close() override; // closes queue, wakes thread, waits until thread closes - void wakeAndDestroy(); + bool wakeAndDestroy(); void glReady() { @@ -402,6 +401,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool // *HACK: Attempt to prevent startup crashes by deferring memory accounting // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18 bool mGLReady = false; + bool mDeleteOnExit = false; bool mGotGLBuffer = false; }; @@ -975,7 +975,11 @@ void LLWindowWin32::close() mhDC = NULL; mWindowHandle = NULL; - mWindowThread->wakeAndDestroy(); + if (mWindowThread->wakeAndDestroy()) + { + // thread will delete itselfs once done + mWindowThread = NULL; + } } bool LLWindowWin32::isValid() @@ -3095,10 +3099,17 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ break; } } - else + else // (NULL == window_imp) { - // (NULL == window_imp) - LL_DEBUGS("Window") << "No window implementation to handle message with, message code: " << U32(u_msg) << LL_ENDL; + if (u_msg == WM_DESTROY) + { + PostQuitMessage(0); // Posts WM_QUIT with an exit code of 0 + return 0; + } + else + { + LL_DEBUGS("Window") << "No window implementation to handle message with, message code: " << U32(u_msg) << LL_ENDL; + } } // pass unhandled messages down to Windows @@ -4569,25 +4580,11 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList() #endif // LL_WINDOWS inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread() - : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, true /*should be false, temporary workaround for SL-18721*/) + : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, false) { LL::ThreadPool::start(); } -void LLWindowWin32::LLWindowWin32Thread::close() -{ - if (!mQueue->isClosed()) - { - LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL; - LL::ThreadPool::close(); - - // Workaround for SL-18721 in case window closes too early and abruptly - LLSplashScreen::show(); - LLSplashScreen::update("..."); // will be updated later - } -} - - /** * LogChange is to log changes in status while trying to avoid spamming the * log with repeated messages, especially in a tight loop. It refuses to log @@ -4785,14 +4782,19 @@ void LLWindowWin32::LLWindowWin32Thread::run() } #endif } + + if (mDeleteOnExit) + { + delete this; + } } -void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() +bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() { if (mQueue->isClosed()) { - LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." << LL_ENDL; - return; + LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." <<LL_ENDL; + return false; } // Make sure we don't leave a blank toolbar button. @@ -4831,6 +4833,15 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() mGLReady = false; }); + mDeleteOnExit = true; + SetWindowLongPtr(old_handle, GWLP_USERDATA, NULL); + + // Let thread finish on its own and don't block main thread. + for (auto& pair : mThreads) + { + pair.second.detach(); + } + LL_DEBUGS("Window") << "Closing window's pool queue" << LL_ENDL; mQueue->close(); @@ -4887,6 +4898,7 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() } } LL_DEBUGS("Window") << "thread pool shutdown complete" << LL_ENDL; + return true; } void LLWindowWin32::post(const std::function<void()>& func) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3d4f5e1054..5f1d19c827 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1448,14 +1448,22 @@ LLVector3 LLAgent::getReferenceUpVector() return up_vector; } - // Radians, positive is downward toward ground //----------------------------------------------------------------------------- // pitch() //----------------------------------------------------------------------------- void LLAgent::pitch(F32 angle) { - // don't let user pitch if pointed almost all the way down or up + if (fabs(angle) <= 1e-4) + return; + + LLCoordFrame newCoordFrame(mFrameAgent); + newCoordFrame.pitch(angle); + + // don't let user pitch if rotated 180 degree around the vertical axis + if ((newCoordFrame.getXAxis()[VX] * mFrameAgent.getXAxis()[VX] < 0) && + (newCoordFrame.getXAxis()[VY] * mFrameAgent.getXAxis()[VY] < 0)) + return; // A dot B = mag(A) * mag(B) * cos(angle between A and B) // so... cos(angle between A and B) = A dot B / mag(A) / mag(B) diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 52571f3c55..a407a65be0 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -112,6 +112,7 @@ private: //-------------------------------------------------------------------- public: void switchCameraPreset(ECameraPreset preset); + ECameraPreset getCameraPreset() const { return mCameraPreset; } /** Determines default camera offset depending on the current camera preset */ LLVector3 getCameraOffsetInitial(); /** Determines default focus offset depending on the current camera preset */ diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 11c5ffecb6..5114ac8a08 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -839,7 +839,7 @@ void AISAPI::onUpdateReceived(const LLSD& update, COMMAND_TYPE type, const LLSD& if ( (type == UPDATECATEGORY || type == UPDATEITEM) && gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { - dump_sequential_xml(gAgentAvatarp->getFullname() + "_ais_update", update); + dump_sequential_xml(gAgentAvatarp->getDebugName() + "_ais_update", update); } AISUpdate ais_update(update, type, request_body); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 2877bb7c49..9e6aff41cf 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2251,7 +2251,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) } if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { - dump_sequential_xml(gAgentAvatarp->getFullname() + "_slam_request", contents); + dump_sequential_xml(gAgentAvatarp->getDebugName() + "_slam_request", contents); } slam_inventory_folder(getCOF(), contents, link_waiter); @@ -3977,7 +3977,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd LL_DEBUGS("Avatar") << "succeeded" << LL_ENDL; if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { - dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_ok", result); + dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_ok", result); } } while (bRetry); @@ -3986,7 +3986,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd /*static*/ void LLAppearanceMgr::debugAppearanceUpdateCOF(const LLSD& content) { - dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_error", content); + dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_error", content); LL_INFOS("Avatar") << "AIS COF, version received: " << content["expected"].asInteger() << " ================================= " << LL_ENDL; diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 9201241856..660fb1b41a 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -129,14 +129,14 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_ { LLVector3 pos_box_offset = point_to_box_offset(vol_pos, unshift_extents); F32 offset_dist = pos_box_offset.length(); - if (offset_dist > MAX_LEGAL_OFFSET && offset_dist > 0.f) + if (offset_dist > max_legal_offset && offset_dist > 0.f) { - F32 target_dist = (offset_dist - MAX_LEGAL_OFFSET); + F32 target_dist = (offset_dist - max_legal_offset); new_pos_fixup = (target_dist/offset_dist)*pos_box_offset; } if (new_pos_fixup != mPositionConstraintFixup) { - LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup " + LL_DEBUGS("ConstraintFix") << getDebugName() << " pos fix, offset_dist " << offset_dist << " pos fixup " << new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL; LL_DEBUGS("ConstraintFix") << "vol_pos " << vol_pos << LL_ENDL; LL_DEBUGS("ConstraintFix") << "extents " << extents[0] << " " << extents[1] << LL_ENDL; @@ -144,11 +144,11 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_ } } - if (box_size/mScaleConstraintFixup > MAX_LEGAL_SIZE) + if (box_size/mScaleConstraintFixup > max_legal_size) { - new_scale_fixup = mScaleConstraintFixup* MAX_LEGAL_SIZE /box_size; - LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup " - << mScaleConstraintFixup << " max legal " << MAX_LEGAL_SIZE + new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size; + LL_DEBUGS("ConstraintFix") << getDebugName() << " scale fix, box_size " << box_size << " fixup " + << mScaleConstraintFixup << " max legal " << max_legal_size << " -> new scale " << new_scale_fixup << LL_ENDL; } } @@ -231,7 +231,7 @@ void LLControlAvatar::matchVolumeTransform() const LLMeshSkinInfo* skin_info = mRootVolp->getSkinInfo(); if (skin_info) { - LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL; + LL_DEBUGS("BindShape") << getDebugName() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL; bind_rot = LLSkinningUtil::getUnscaledQuaternion(LLMatrix4(skin_info->mBindShapeMatrix)); } #endif diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index ff30c83f51..f2345f5c01 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -33,6 +33,7 @@ #include "llagentui.h" #include "llbase64.h" #include "llcallbacklist.h" +#include "lldate.h" #include "llenvironment.h" #include "llimagejpeg.h" #include "llmediactrl.h" @@ -863,15 +864,7 @@ const std::string LLFloater360Capture::generate_proposed_filename() filename << "_"; // add in the current HH-MM-SS (with leading 0's) so users can easily save many shots in same folder - std::time_t cur_epoch = std::time(nullptr); - std::tm* tm_time = std::localtime(&cur_epoch); - filename << std::setfill('0') << std::setw(4) << (tm_time->tm_year + 1900); - filename << std::setfill('0') << std::setw(2) << (tm_time->tm_mon + 1); - filename << std::setfill('0') << std::setw(2) << tm_time->tm_mday; - filename << "_"; - filename << std::setfill('0') << std::setw(2) << tm_time->tm_hour; - filename << std::setfill('0') << std::setw(2) << tm_time->tm_min; - filename << std::setfill('0') << std::setw(2) << tm_time->tm_sec; + filename << LLDate::now().toLocalDateString("%Y%m%d_%H%M%S"); // the unusual way we save the output image (originates in the // embedded browser and not the C++ code) means that the system diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index 588f1f7f28..422f056f01 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -401,6 +401,30 @@ bool LLFloaterMyEnvironment::canApply(const std::string &context) return false; } +bool can_delete(const LLUUID& id) +{ + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (id == trash_id || gInventory.isObjectDescendentOf(id, trash_id)) + { + return false; + } + + LLViewerInventoryCategory* cat = gInventory.getCategory(id); + if (cat) + { + if (!get_is_category_removable(&gInventory, id)) + { + return false; + } + } + else if (!get_is_item_removable(&gInventory, id, true)) + { + return false; + } + + return true; +} + //------------------------------------------------------------------------- void LLFloaterMyEnvironment::refreshButtonStates() { @@ -411,7 +435,14 @@ void LLFloaterMyEnvironment::refreshButtonStates() getChild<LLUICtrl>(BUTTON_GEAR)->setEnabled(settings_ok); getChild<LLUICtrl>(BUTTON_NEWSETTINGS)->setEnabled(true); - getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(settings_ok && !selected.empty()); + + bool enable_delete = false; + if(settings_ok && !selected.empty()) + { + enable_delete = can_delete(selected.front()); + } + + getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(enable_delete); } //------------------------------------------------------------------------- diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index 24dbe61bad..947ee4200d 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -179,7 +179,7 @@ void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset) void LLTexturePreviewView::setImageFromItemId(const LLUUID& idItem) { const LLViewerInventoryItem* pItem = gInventory.getItem(idItem); - setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null ); + setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null); } // ============================================================================ diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 283be752ed..6580752c79 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -350,7 +350,10 @@ void PeopleContextMenu::eject() avatar = (LLVOAvatar*) object; } } - if (!avatar) return; + + if (!avatar) + return; + LLSD payload; payload["avatar_id"] = avatar->getID(); std::string fullname = avatar->getFullname(); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 0ce1f0f9d3..891896076a 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -176,7 +176,7 @@ bool LLPanelPermissions::postBuild() childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this); - childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this); + childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSalePrice, this); childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this); childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this); @@ -781,7 +781,9 @@ void LLPanelPermissions::refresh() if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { - getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale)); + bool change_sale_allowed = can_transfer || (!can_transfer && num_for_sale); + getChildView("checkbox for sale")->setEnabled(change_sale_allowed); + getChildView("Edit Cost")->setEnabled(change_sale_allowed && !is_for_sale_mixed); // Set the checkbox to tentative if the prices of each object selected // are not the same. getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed); @@ -1223,6 +1225,16 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data) self->setAllSaleInfo(); } +void LLPanelPermissions::onCommitSalePrice(LLUICtrl *, void *data) +{ + LLPanelPermissions *self = (LLPanelPermissions *) data; + LLCheckBoxCtrl *checkPurchase = self->getChild<LLCheckBoxCtrl>("checkbox for sale"); + if (checkPurchase && checkPurchase->get()) + { + self->setAllSaleInfo(); + } +} + void LLPanelPermissions::setAllSaleInfo() { LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL; diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 77129434ed..12e88361c9 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -77,6 +77,7 @@ protected: static void onCommitSaleInfo(LLUICtrl* ctrl, void* data); static void onCommitSaleType(LLUICtrl* ctrl, void* data); + static void onCommitSalePrice(LLUICtrl *ctrl, void *data); void setAllSaleInfo(); static void onCommitClickAction(LLUICtrl* ctrl, void*); diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index cee43f3cff..afa4686d52 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -116,8 +116,8 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin // needed for handling of any legacy bad data. if (!avatar->getJoint(skin->mJointNames[j])) { - LL_DEBUGS("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL; - LL_WARNS_ONCE("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL; + LL_DEBUGS("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL; + LL_WARNS_ONCE("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL; skin->mJointNames[j] = "mPelvis"; skin->mJointNumsInitialized = false; // force update after names change. } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 69c40066b4..8821494e91 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2474,12 +2474,13 @@ LLTextureFetch::~LLTextureFetch() } S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) + S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http, S32& worker_discard) { LL_PROFILE_ZONE_SCOPED; + worker_discard = -1; if (mDebugPause) { - return -1; + return FETCH_REQUEST_CREATION_FAILED; } if (f_type == FTT_SERVER_BAKE) @@ -2495,7 +2496,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L << host << " != " << worker->mHost << LL_ENDL; removeRequest(worker, true); worker = NULL; - return -1; + return FETCH_REQUEST_ABORTED; } } @@ -2548,13 +2549,14 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L { if (worker->wasAborted()) { - return -1; // need to wait for previous aborted request to complete + return FETCH_REQUEST_ABORTED; // need to wait for previous aborted request to complete } + worker_discard = desired_discard; worker->lockWorkMutex(); // +Mw if (worker->mState == LLTextureFetchWorker::DONE && worker->mDesiredSize == llmax(desired_size, TEXTURE_CACHE_ENTRY_SIZE) && worker->mDesiredDiscard == desired_discard) { worker->unlockWorkMutex(); // -Mw - return -1; // similar request has failed or is in a transitional state + return FETCH_REQUEST_EXISTS; // similar request has failed or is in a transitional state } worker->mActiveCount++; worker->mNeedsAux = needs_aux; @@ -2588,11 +2590,12 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L worker->mNeedsAux = needs_aux; worker->setCanUseHTTP(can_use_http) ; worker->unlockWorkMutex(); // -Mw + worker_discard = desired_discard; } LL_DEBUGS(LOG_TXT) << "REQUESTED: " << id << " f_type " << fttype_to_string(f_type) << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL; - return desired_discard; + return FETCH_REQUEST_OK; } // Threads: T* // diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 3405f76e37..c2296135e2 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -76,9 +76,14 @@ public: // Threads: Tmain void shutDownImageDecodeThread(); + static constexpr S32 FETCH_REQUEST_OK = 0; + static constexpr S32 FETCH_REQUEST_CREATION_FAILED = -1; + static constexpr S32 FETCH_REQUEST_ABORTED = -2; + static constexpr S32 FETCH_REQUEST_EXISTS = -3; // Threads: T* (but Tmain mostly) + // returns discard on success, fail code otherwise S32 createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http); + S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http, S32& worker_disacrd); // Requests that a fetch operation be deleted from the queue. // If @cancel is true, also stops any I/O operations pending. diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index ae21d3e733..b077262f06 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -111,7 +111,9 @@ void LLThumbnailCtrl::draw() gl_draw_scaled_image( draw_rect.mLeft, draw_rect.mBottom, draw_rect.getWidth(), draw_rect.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); - mTexturep->setKnownDrawSize(draw_rect.getWidth(), draw_rect.getHeight()); + // Thumbnails are usually 256x256 or smaller, either report that or + // some high value to get image with higher priority + mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE); } else if( mImagep.notNull() ) { @@ -238,12 +240,8 @@ void LLThumbnailCtrl::initImage() { // Should it support baked textures? mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_THUMBNAIL); - mTexturep->forceToSaveRawImage(0); - - S32 desired_draw_width = MAX_IMAGE_SIZE; - S32 desired_draw_height = MAX_IMAGE_SIZE; - mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height); + mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE); } } else if (tvalue.isString()) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0e3039708b..5aabc89773 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1879,7 +1879,6 @@ class LLAdvancedAppearanceToXML : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string emptyname; LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); LLVOAvatar *avatar = NULL; if (obj) @@ -1906,7 +1905,7 @@ class LLAdvancedAppearanceToXML : public view_listener_t } if (avatar) { - avatar->dumpArchetypeXML(emptyname); + avatar->dumpArchetypeXML(LLStringUtil::null); } return true; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0f9c65893d..a65e967013 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1070,6 +1070,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mOrigHeight = 0; mHasAux = false; mNeedsAux = false; + mLastWorkerDiscardLevel = -1; mRequestedDiscardLevel = -1; mRequestedDownloadPriority = 0.f; mFullyLoaded = false; @@ -1222,12 +1223,11 @@ void LLViewerFetchedTexture::loadFromFastCache() if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL) { - S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; - S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; - if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)) + if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)) { - // scale oversized icon, no need to give more work to gl - mRawImage->scale(expected_width, expected_height); + // Scale oversized thumbnail + // thumbnails aren't supposed to go over DEFAULT_THUMBNAIL_DIMENSIONS + mRawImage->scale(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS); } } @@ -1904,13 +1904,10 @@ bool LLViewerFetchedTexture::updateFetch() if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL) { - S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; - S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; - if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)) + if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)) { - // scale oversized icon, no need to give more work to gl - // since we got mRawImage from thread worker and image may be in use (ex: writing cache), make a copy - mRawImage = mRawImage->scaled(expected_width, expected_height); + // Scale oversized thumbnail + mRawImage = mRawImage->scaled(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS); } } @@ -2044,18 +2041,25 @@ bool LLViewerFetchedTexture::updateFetch() } // bypass texturefetch directly by pulling from LLTextureCache - S32 fetch_request_discard = -1; - fetch_request_discard = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority, - w, h, c, desired_discard, needsAux(), mCanUseHTTP); + S32 worker_discard = -1; + S32 result = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority, + w, h, c, desired_discard, needsAux(), mCanUseHTTP, worker_discard); + - if (fetch_request_discard >= 0) + if ((result >= 0) // Worker created + // scaled and standard images share requests, they just process the result differently + // if mLastWorkerDiscardLevel doen't match worker, worker was requested by a different + // image and current one needs to schedule an update + || (result == LLTextureFetch::FETCH_REQUEST_EXISTS + && mLastWorkerDiscardLevel != worker_discard) + ) { LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created"); mHasFetcher = true; mIsFetching = true; // in some cases createRequest can modify discard, as an example // bake textures are always at discard 0 - mRequestedDiscardLevel = llmin(desired_discard, fetch_request_discard); + mRequestedDiscardLevel = llmin(desired_discard, worker_discard); mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); } @@ -2648,8 +2652,6 @@ void LLViewerFetchedTexture::saveRawImage() return; } - LLImageDataSharedLock lock(mRawImage); - mSavedRawDiscardLevel = mRawDiscardLevel; if (mBoostLevel == LLGLTexture::BOOST_ICON) { @@ -2665,27 +2667,13 @@ void LLViewerFetchedTexture::saveRawImage() mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents()); } } - else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL) - { - S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; - S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; - if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height) - { - mSavedRawImage = new LLImageRaw(expected_width, expected_height, 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(expected_width, expected_height, mRawImage->getComponents()); + mSavedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, mRawImage->getComponents()); mSavedRawImage->copyScaled(mRawImage); } else diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 65fa633f81..c5dbbb82ef 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -439,6 +439,7 @@ protected: bool mKnownDrawSizeChanged ; std::string mUrl; + S32 mLastWorkerDiscardLevel; S32 mRequestedDiscardLevel; F32 mRequestedDownloadPriority; S32 mFetchState; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5ae6adc21e..b0a0314e85 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -66,6 +66,7 @@ #include "llchatentry.h" #include "indra_constants.h" #include "llassetstorage.h" +#include "lldate.h" #include "llerrorcontrol.h" #include "llfontgl.h" #include "llmousehandler.h" @@ -4803,22 +4804,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save } // Look for an unused file name - bool is_snapshot_name_loc_set = isSnapshotLocSet(); + auto is_snapshot_name_loc_set = isSnapshotLocSet(); std::string filepath; - S32 i = 1; - S32 err = 0; - std::string extension("." + image->getExtension()); + auto i = 1; + auto err = 0; + auto extension("." + image->getExtension()); + auto now = LLDate::now(); do { filepath = sSnapshotDir; filepath += gDirUtilp->getDirDelimiter(); filepath += sSnapshotBaseName; - - if (is_snapshot_name_loc_set) - { - filepath += llformat("_%.3d",i); - } - + filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S"); + filepath += llformat("%.2d", i); filepath += extension; llstat stat_info; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 690cfaa677..27fb04a5dd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -576,7 +576,7 @@ private: // joint states to be animated //------------------------------------------------------------------------- LLPointer<LLJointState> mPelvisState; - LLCharacter* mCharacter; + LLCharacter* mCharacter; }; /** @@ -777,11 +777,9 @@ std::string LLVOAvatar::avString() const { return " " + getFullname() + " "; } - else - { - std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus()); - return " Avatar '" + getFullname() + "' " + viz_string + " "; - } + + std::string status = LLVOAvatar::rezStatusToString(getRezzedStatus()); + return " Avatar '" + getDebugName() + "' " + status + " "; } void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment) @@ -804,10 +802,10 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { LLSD args; - args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); - args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["EXISTENCE"] = llformat("%d", (U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d", (U32)mRuthDebugTimer.getElapsedTimeF32()); args["NAME"] = getFullname(); - LLNotificationsUtil::add(notification_name,args); + LLNotificationsUtil::add(notification_name, args); } } @@ -820,14 +818,14 @@ LLVOAvatar::~LLVOAvatar() if (!mFullyLoaded) { - debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); + debugAvatarRezTime("AvatarRezLeftCloudNotification", "left after ruth seconds as cloud"); } else { - debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); + debugAvatarRezTime("AvatarRezLeftNotification", "left sometime after declouding"); } - if(mTuned) + if (mTuned) { LLPerfStats::tunedAvatars--; mTuned = false; @@ -2827,11 +2825,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) S32 compl_upd_freq = 20; if (isControlAvatar()) { - // animeshes do not (or won't) have impostors nor change outfis, + // animeshes do not (or won't) have impostors nor change outfis,F // no need for high frequency compl_upd_freq = 100; } - else if (mLastRezzedStatus <= 0) //cloud or init + else if (mLastRezzedStatus <= 0) // cloud or initial { compl_upd_freq = 60; } @@ -2839,11 +2837,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) { compl_upd_freq = 5; } - else if (mLastRezzedStatus == 1) //'grey', not fully loaded + else if (mLastRezzedStatus == 1) // 'gray', not fully loaded { compl_upd_freq = 40; } - else if (isInMuteList()) //cheap, buffers value from search + else if (isInMuteList()) // cheap, buffers value from search { compl_upd_freq = 100; } @@ -2965,7 +2963,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; if (LLVOAvatar::sJointDebug) { - LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL; + LL_INFOS() << getDebugName() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL; } LLJoint::sNumUpdates = 0; @@ -6177,8 +6175,11 @@ void LLVOAvatar::resetAnimations() flushAllMotions(); } -// Override selectively based on avatar sex and whether we're using new -// animations. +//----------------------------------------------------------------------------- +// remapMotionID() +// Override selectively based on avatar sex and whether we're using new animations. +//----------------------------------------------------------------------------- +// virtual LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) { static LLCachedControl<bool> use_new_walk_run(gSavedSettings, "UseNewWalkRun"); @@ -6228,7 +6229,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) } return result; - } //----------------------------------------------------------------------------- @@ -6297,6 +6297,7 @@ void LLVOAvatar::stopMotionFromSource(const LLUUID& source_id) //----------------------------------------------------------------------------- // addDebugText() //----------------------------------------------------------------------------- +// virtual void LLVOAvatar::addDebugText(const std::string& text) { mDebugText.append(1, '\n'); @@ -6304,8 +6305,22 @@ void LLVOAvatar::addDebugText(const std::string& text) } //----------------------------------------------------------------------------- +// getDebugName() +//----------------------------------------------------------------------------- +// virtual +std::string LLVOAvatar::getDebugName() const +{ +#if LL_RELEASE_WITH_DEBUG_INFO + return getFullname(); +#else + return getID().asString(); +#endif // LL_RELEASE_WITH_DEBUG_INFO +} + +//----------------------------------------------------------------------------- // getID() //----------------------------------------------------------------------------- +// virtual const LLUUID& LLVOAvatar::getID() const { return mID; @@ -6315,6 +6330,7 @@ const LLUUID& LLVOAvatar::getID() const // getJoint() //----------------------------------------------------------------------------- // RN: avatar joints are multi-rooted to include screen-based attachments +// virtual LLJoint *LLVOAvatar::getJoint( const std::string &name ) { joint_map_t::iterator iter = mJointMap.find(name); @@ -6583,11 +6599,11 @@ void LLVOAvatar::updateAttachmentOverrides() } } pelvis_fixups = mPelvisFixups; - //dumpArchetypeXML(getFullname() + "_paranoid_updated"); + //dumpArchetypeXML(getDebugName() + "_paranoid_updated"); // Rebuild and compare rebuildAttachmentOverrides(); - //dumpArchetypeXML(getFullname() + "_paranoid_rebuilt"); + //dumpArchetypeXML(getDebugName() + "_paranoid_rebuilt"); bool mismatched = false; for (S32 joint_num = 0; joint_num < LL_CHARACTER_MAX_ANIMATED_JOINTS; joint_num++) { @@ -6816,22 +6832,22 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const { std::stringstream ss; std::copy(pos_names.begin(), pos_names.end(), std::ostream_iterator<std::string>(ss, ",")); - LL_INFOS() << getFullname() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL; + LL_INFOS() << avString() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL; } else { - LL_DEBUGS("Avatar") << getFullname() << " no attachment positions defined for any joints" << "\n" << LL_ENDL; + LL_DEBUGS("Avatar") << avString() << " no attachment positions defined for any joints" << "\n" << LL_ENDL; } if (scale_names.size()) { std::stringstream ss; std::copy(scale_names.begin(), scale_names.end(), std::ostream_iterator<std::string>(ss, ",")); - LL_INFOS() << getFullname() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL; + LL_INFOS() << getDebugName() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL; } else { - LL_INFOS() << getFullname() << " no attachment scales defined for any joints" << "\n" << LL_ENDL; + LL_INFOS() << getDebugName() << " no attachment scales defined for any joints" << "\n" << LL_ENDL; } if (!verbose) @@ -8390,7 +8406,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 < 3 && !isFullyBaked()) + || (rez_status < 4 && !isFullyBaked()) || hasPendingAttachedMeshes() ); @@ -8451,21 +8467,22 @@ 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; } - - if (mFirstFullyVisible) + else if (!mFullyLoaded) { - F32 first_use_delay = FIRST_APPEARANCE_CLOUD_MIN_DELAY; - if (!isSelf() && 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 (mFirstFullyVisible) { + 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( @@ -8479,12 +8496,13 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading) // 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) @@ -9406,12 +9424,12 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value) void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, const LLAppearanceMessageContents& contents) { - std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml"); + std::string outfilename = get_sequential_numbered_file_name(dump_prefix, ".xml"); const std::vector<F32>& params_for_dump = contents.mParamWeights; const LLTEContents& tec = contents.mTEContents; LLAPRFile outfile; - std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); + std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, outfilename); outfile.open(fullpath, LL_APR_WB ); apr_file_t* file = outfile.getFileHandle(); if (!file) @@ -9624,7 +9642,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) static LLCachedControl<bool> enable_verbose_dumps(gSavedSettings, "DebugAvatarAppearanceMessage"); static LLCachedControl<bool> block_avatar_appearance_messages(gSavedSettings, "BlockAvatarAppearanceMessages"); - std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_"; + std::string dump_prefix = getDebugName() + (isSelf() ? "_s_" : "_o_"); if (block_avatar_appearance_messages) { LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL; @@ -10258,7 +10276,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara std::string outprefix(prefix); if (outprefix.empty()) { - outprefix = getFullname() + (isSelf()?"_s":"_o"); + outprefix = getDebugName() + (isSelf()?"_s":"_o"); } if (outprefix.empty()) { @@ -10754,7 +10772,7 @@ void LLVOAvatar::updateRiggingInfo() { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - LL_DEBUGS("RigSpammish") << getFullname() << " updating rig tab" << LL_ENDL; + LL_DEBUGS("RigSpammish") << getDebugName() << " updating rig tab" << LL_ENDL; // use a local static for scratch space to avoid reallocation here static std::vector<LLVOVolume*> volumes; @@ -10798,7 +10816,7 @@ void LLVOAvatar::updateRiggingInfo() //LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL; // Remove debug only stuff on hot path - // LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL; + // LL_DEBUGS("RigSpammish") << getDebugName() << " after update rig tab:" << LL_ENDL; // S32 joint_count, box_count; // showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count); // LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index dd1725c322..8c6fe5a7b0 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -231,7 +231,8 @@ public: std::set<LLUUID> mActiveOverrideMeshes; virtual void onActiveOverrideMeshesChanged(); - /*virtual*/ const LLUUID& getID() const; +/*virtual*/ const LLUUID& getID() const; + /*virtual*/ std::string getDebugName() const; /*virtual*/ void addDebugText(const std::string& text); /*virtual*/ F32 getTimeDilation(); /*virtual*/ void getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm); @@ -329,16 +330,16 @@ public: // avatar render cost - U32 getVisualComplexity() { return mVisualComplexity; }; + U32 getVisualComplexity() { return mVisualComplexity; }; // surface area calculation - F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; + F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; - U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server - void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; + U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server + void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; - S32 getUpdatePeriod() { return mUpdatePeriod; }; - const LLColor4 & getMutedAVColor() { return mMutedAVColor; }; + S32 getUpdatePeriod() { return mUpdatePeriod; }; + const LLColor4 & getMutedAVColor() { return mMutedAVColor; }; static void updateImpostorRendering(U32 newMaxNonImpostorsValue); void idleUpdateBelowWater(); |