summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
AgeCommit message (Collapse)Author
2024-07-08The I/O manipulator std::quoted() must be passed to an ostream.Nat Goodspeed
2024-07-08Combine LLAppearanceMgr::wearOutfit() and wearOutfitByName()Nat Goodspeed
into new private wearOutfit(LLInventoryCategory*) method.
2024-07-05clean up and rename demo scriptMnikolenko Productengine
2024-07-01build fixMaxim Nikolenko
2024-07-01Move error strings to strings.xml; pass wearable type and is_worn flag for ↵Mnikolenko Productengine
outfit items
2024-06-21Add Appearance listenerMnikolenko Productengine
2024-05-23Remove commented-out methods in a couple LLEventTimer subclasses.Nat Goodspeed
2024-05-15Merge branch 'release/luau-scripting' into lua-timers after Maint XNat Goodspeed
2024-05-15Manual whitespace cleanup (fix_whitespace.py).Nat Goodspeed
2024-05-08Tweak a couple thingsNat Goodspeed
2024-05-02Introduce LLLater::getRemaining(handle).Nat Goodspeed
Some timer use cases need to know not only whether the timer is active, but how much time remains before it (next) fires. Introduce LLLater::mDoneTimes to track, for each handle, the timestamp at which it's expected to fire. We can't just look up the target timestamp in mQueue's func_at entry because there's no documented way to navigate from a handle_type to a node iterator or pointer. Nor can we store it in mHandles because of order dependency: we need the mDoneTimes iterator so we can bind it into the Periodic functor for doPeriodically(), but we need the mQueue handle to store in mHandles. If we could find the mQueue node from the new handle, we could update the func_at entry after emplace() -- but if we could find the mQueue node from a handle, we wouldn't need to store the target timestamp separately anyway. Split LLLater::doAtTime() into internal doAtTime1() and doAtTime2(): the first creates an mDoneTimes entry and returns an iterator, the second finishes creating new mQueue and mHandles entries based on that mDoneTimes entry. This lets doPeriodically()'s Periodic bind the mDoneTimes iterator. Then instead of continually incrementing an internal data member, it increments the mDoneTimes entry to set the next upcoming timestamp. That lets getRemaining() report the next upcoming timestamp rather than only the original one. Add LLEventTimer::isRunning() and getRemaining(), forwarding to its LLLater handle. Fix various LLEventTimer subclass references to mEventTimer.stop(), etc. Fix non-inline LLEventTimer subclass tick() overrides for bool, not BOOL. Remove LLAppViewer::idle() call to LLEventTimer::updateClass(). Since LLApp::stepFrame() already calls LLCallbackList::callFunctions(), assume we've already handled that every tick.
2024-05-02WIP: In llcallbacklist.h, add singleton LLLater for time delays.Nat Goodspeed
The big idea is to reduce the number of per-tick callbacks asking, "Is it time yet? Is it time yet?" We do that for LLEventTimer and LLEventTimeout. LLLater presents doAtTime(LLDate), with doAfterInterval() and doPeriodically() methods implemented using doAtTime(). All return handles. The free functions doAfterInterval() and doPeriodically() now forward to the corresponding LLLater methods. LLLater also presents isRunning(handle) and cancel(handle). LLLater borrows the tactic of LLEventTimer: while there's at least one running timer, it registers an LLCallbackList tick() callback to service ready timers. But instead of looping over all of them asking, "Are you ready?" it keeps them in a priority queue ordered by desired timestamp, and only touches those whose timestamp has been reached. Also, it honors a maximum time slice: once the ready timers have run for longer than the limit, it defers processing other ready timers to the next tick() call. The intent is to consume fewer cycles per tick() call, both by the management machinery and the timers themselves. Revamp LLCallbackList to accept C++ callables in addition to (classic C function pointer, void*) pairs. Make addFunction() return a handle (different than LLLater handles) that can be passed to a new deleteFunction() overload, since std::function instances can't be compared for equality. In fact, implement LLCallbackList using boost::signals2::signal, which provides almost exactly what we want. LLCallbackList continues to accept (function pointer, void*) pairs, but now we store a lambda that calls the function pointer with that void*. It takes less horsing around to create a C++ callable from a (function pointer, void*) pair than the other way around. For containsFunction() and deleteFunction(), such pairs are the keys for a lookup table whose values are handles. Instead of having a static global LLCallbackList gIdleCallbacks, make LLCallbackList an LLSingleton to guarantee initialization. For backwards compatibility, gIdleCallbacks is now a macro for LLCallbackList::instance(). Move doOnIdleOneTime() and doOnIdleRepeating() functions to LLCallbackList methods, but for backwards compatibility continue providing free functions. Reimplement LLEventTimer using LLLater::doPeriodically(). One implication is that LLEventTimer need no longer be derived from LLInstanceTracker, which we used to iterate over all instances every tick. Give it start() and stop() methods, since some subclasses (e.g. LLFlashTimer) used to call its member LLTimer's start() and stop(). Remove updateClass(): LLCallbackList::callFunctions() now takes care of that. Remove LLToastLifeTimer::start() and stop(), since LLEventTimer now provides those. Remove getRemainingTimeF32(), since LLLater does not (yet) provide that feature. While at it, make LLEventTimer::tick() return bool instead of BOOL, and change existing overrides. Make LLApp::stepFrame() call LLCallbackList::callFunctions() instead of LLEventTimer::updateClass(). We could have refactored LLEventTimer to use the mechanism now built into LLLater, but frankly the LLEventTimer API is rather clumsy. You MUST derive a subclass and override tick(), and you must instantiate your subclass on the heap because, when your tick() override returns false, LLEventTimer deletes its subclass instance. The LLLater API is simpler to use, and LLEventTimer is much simplified by using it. Merge lleventfilter.h's LLEventTimeoutBase into LLEventTimeout, and likewise merge LLEventThrottleBase into LLEventThrottle. The separation was for testability, but now that they're no longer based on LLTimer, it becomes harder to use dummy time for testing. Temporarily skip tests based on LLEventTimeoutBase and LLEventThrottleBase. Instead of listening for LLEventPump("mainloop") ticks and using LLTimer, LLEventTimeout now uses LLLater::doAfterInterval(). Instead of LLTimer and LLEventTimeout, LLEventThrottle likewise now uses LLLater::doAfterInterval(). Recast a couple local LLEventTimeout pre-lambda callable classes with lambdas. Dignify F64 with a new typedef LLDate::timestamp. LLDate heavily depends on that as its base time representation, but there are those who question use of floating-point for time. This is a step towards insulating us from any future change.
2024-05-01Merge branch 'marchcat/w-whitespace' into marchcat/x-ws-mergeAndrey Lihatskiy
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2024-04-24Merge branch 'main' into marchcat/x-mergeAndrey Lihatskiy
2024-01-09Replace BOOST_FOREACH with standard C++ range-based for-loopsAnsariel
2024-01-08replace boost library to standardAiraYumi
2023-12-18Merge branch 'main' into DRTVWR-591-maint-XAndrey Lihatskiy
# Conflicts: # doc/contributions.txt # indra/newview/llpanelprofile.cpp # indra/newview/llspatialpartition.cpp
2023-11-13SL-20575 Fix some deletion issuesAndrey Kleshchev
- Fixes 'cut' checks for gallery - Checking if large folder is deletable should be faster now - For large flat root folders eliminated delay of looking for cof Might be a good idea to start cashing isItemRemovable if category version hasn't changed.
2023-10-18SL-20232 Cleanup #6Andrey Kleshchev
2023-10-17SL-20232 Allow deletion of worn items #1Andrey Kleshchev
2023-10-12SL-20436 New accounts that select outfit in web fail to download clothingAndrey Kleshchev
2023-10-03SL-20368 Request outfits using 'links'Andrey Kleshchev
instead of getting items one by one
2023-09-14SL-20285 Updated individual request count declarationAndrey Kleshchev
2023-09-14SL-20285 Sturdier cof and fixed link fetchingAndrey Kleshchev
2023-08-23Merge branch main (DRTVWR-582) into DRTVWR-567Andrey Kleshchev
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llinventoryfunctions.cpp # indra/newview/llinventoryfunctions.h # indra/newview/llinventorymodel.cpp # indra/newview/llinventoryobserver.cpp # indra/newview/llinventoryobserver.h # indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml
2023-08-05SL-20120 Fix unneeded warningsAndrey Kleshchev
- Don't Warn about unknown cof version, it's expected during fetch, Info is enough - Fix 'unexpected attachments' due to unknown cof, also should fix viewer trying to create a link before cof is ready - Fix 'accounting' warnings when getting item updates for unfetched folders (Note: viewer doesn't know folders version, if fetch is already in progress we might get an old version)
2023-07-19SL-20015 wait for the outfit items to load before wearing itMaxim Nikolenko
2023-05-05SL-19533 Prevent COF dupplicate requestAndrey Kleshchev
2023-04-27SL-19533 Implement subset variant of children requestAndrey Kleshchev
2023-04-25SL-19533 Special COF handling #3Andrey Kleshchev
2023-04-25SL-19533 Special COF handling #2Andrey Kleshchev
2023-04-19SL-19609 Urls aren't dispatched according to the indicated gridAndrey Kleshchev
2023-04-13SL-19533 MacOS build fixAndrey Kleshchev
2023-04-13SL-19533 Faster decloudingAndrey Kleshchev
2023-04-08SL-19529 Fix uninitialized variable and calback counterAndrey Kleshchev
2023-04-07Merge branch 'main' into marchcat/main-contrib-mergeAndrey Lihatskiy
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
2023-03-29SL-19502 Copying folders should copy thumbnailsAndrey Kleshchev
2023-03-28SL-18003 Bulk download items when possibleAndrey Kleshchev
And signal fodler fetch completion when folder of recursive fetch is done, do not hold it for individual items
2023-03-26SL-18003 Bulk fetch some items by fetching whole folderAndrey Kleshchev
2023-03-20SL-18629 Load cof only once links are readyAndrey Kleshchev
2023-03-10SL-18629 Creare items via AIS placeholderAndrey Kleshchev
2023-03-10SL-18629 WIP Replacing UDP creation messages with callback based AIS #2Andrey Kleshchev
findCategory and move_item_to_marketplacelistings
2023-03-10SL-18629 WIP Replacing UDP creation messages with callback based AISAndrey Kleshchev
2023-02-15SL-18330: Fix egregious existing build errors in contribute branch.Nat Goodspeed
2023-02-15SL-19159 Build fixesAndrey Kleshchev
2023-02-03Merge branch 'main' into DRTVWR-567Maxim Nikolenko
# Conflicts: # indra/newview/llappearancemgr.cpp # indra/newview/llpanelmaininventory.cpp
2023-01-24SL-18629 - various notes on work for D567Brad Payne (Vir Linden)
2022-11-22SL-18629 - use AISAPI for some paths of new category creationBrad Payne (Vir Linden)
2022-11-21SL-18629 - moving createNewCategory to AIS3Brad Payne (Vir Linden)