summaryrefslogtreecommitdiff
path: root/indra/llui
AgeCommit message (Collapse)Author
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-04-10Merge branch 'main' into marchcat/y-mergeAndrey Lihatskiy
# Conflicts: # autobuild.xml # indra/llcommon/llsys.cpp
2024-03-27Merge branch 'main' into marchcat/yz-mergeAndrey Lihatskiy
2024-03-27Merge remote-tracking branch 'origin/main' into DRTVWR-588-maint-WAndrey Lihatskiy
# Conflicts: # .github/workflows/build.yaml
2024-03-24viewer#1033 Crash at syncFloaterTabOrderAndrey Kleshchev
2024-03-24Revert "SL-20416 Fix Crash Report 1409376 (update)"Andrey Kleshchev
This reverts commit cc43f42e6b7401c2cdd3204a16f757f5169bd95b.
2024-03-22Add Develop menu option 'Debug Camera Controls'Alexander Gavriliuk
2024-03-05SL-17896 Don't crash silently if files are missing or out of memoryAndrey Kleshchev
Under debug LL_ERRS will show a message as well, but release won't show anything and will quit silently so show a notification when applicable.
2024-03-01Merge branch 'main' into marchcat/yz-mergeAndrey Lihatskiy
# Conflicts: # indra/newview/llinventorygallery.cpp
2024-03-01Merge branch 'main' into DRTVWR-588-maint-WAndrey Lihatskiy
2024-02-23viewer#875 Crash at uri normalizationAndrey Kleshchev
Note that crash happened when setting LLProgressView::setMessage
2024-02-08SL-20363 Add Advanced option 'Debug Unicode'Alexander Gavriliuk
2024-02-05Merge branch 'DRTVWR-599-maint-Z' into release/maint-yzAndrey Lihatskiy
# Conflicts: # indra/newview/llchiclet.h
2024-01-24SL-20416 Fix Crash Report 1409376 (update)Alexander Gavriliuk
2024-01-23SL-20416 Fix Crash Report 1409376Alexander Gavriliuk
2024-01-24SL-20416 Avoid of taking focus by EmojiPickerAlexander Gavriliuk
2024-01-17SL-20795 Part of previously typed emojis disappear in the 'Save settings as ↵Alexander Gavriliuk
a preset...' option of the 'Preferences' floater
2024-01-11SL-20756 The emoji in the profile floater is displayed schematicallyAlexander Gavriliuk
2024-01-09DRTVWR-599 OSX buildfixAndrey Lihatskiy
2024-01-09Simplify expressionAnsariel
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-594-maint-YAndrey Lihatskiy
2023-12-15Merge branch 'main' into DRTVWR-489Andrey Lihatskiy
# Conflicts: # indra/newview/fonts/DejaVu-license.txt # indra/newview/fonts/DejaVuSans-Bold.ttf # indra/newview/fonts/DejaVuSans-BoldOblique.ttf # indra/newview/fonts/DejaVuSans-Oblique.ttf # indra/newview/fonts/DejaVuSans.ttf # indra/newview/fonts/DejaVuSansMono.ttf
2023-12-14Merge branch 'DRTVWR-587-maint-V' into DRTVWR-588-maint-WAndrey Lihatskiy
# Conflicts: # indra/newview/llspatialpartition.cpp
2023-12-05Merge branch 'main' into DRTVWR-489Alexander Gavriliuk
2023-11-30Merge branch 'DRTVWR-594-maint-Y' into marchcat/594-y-pbr-mergeAndrey Lihatskiy
# Conflicts: # indra/newview/llinventorygallery.cpp # indra/newview/skins/default/xui/en/notifications.xml
2023-11-30SL-19801 Log unicode characters for debugAlexander Gavriliuk
2023-11-30Merge branch 'DRTVWR-588-maint-W' into marchcat/588-w-pbr-mergeAndrey Lihatskiy
# Conflicts: # indra/llrender/llgl.cpp # indra/llrender/llvertexbuffer.cpp # indra/llui/llflatlistview.cpp # indra/newview/lldrawpoolground.cpp # indra/newview/llspatialpartition.cpp # indra/newview/lltexturefetch.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llviewertexture.cpp # indra/newview/llvosky.cpp # indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml # indra/newview/skins/default/xui/en/floater_stats.xml # indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml # indra/newview/skins/default/xui/en/notifications.xml # indra/newview/skins/default/xui/en/panel_performance_preferences.xml
2023-11-29Merge branch 'DRTVWR-559' into marchcat/587-v-pbr-mergeAndrey Lihatskiy
# Conflicts: # indra/llcommon/CMakeLists.txt # indra/newview/llspatialpartition.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llvoavatar.cpp
2023-11-24SL-17076 Thread safety of LLNotificationChannelBase's itemsAndrey Kleshchev
Due to odd crashes when cleaning mItems adding thread safety Viewer runs window in a separate thread, it is possible notification was added in a way that corrupted the list.
2023-11-24SL-17076 MacOS crash on clearing ChicletNotificationChannelAndrey Kleshchev
Crash appears to happens inside mItems.clear() of the LLNotificationChannelBase, but there is no apparent reson for it and stack jumped some steps, so I'm doing cleanup more explicitly to see if it's indeed there and not a corruption somewhere earlier.
2023-11-23SL-17846 Crash at ~LLSearchEditorAndrey Kleshchev
A weird crash inside LLSearchEditor, try clearing it explicitly
2023-11-09SL-20438 Emoji picker will dock with edge of screen if the Conversations ↵Alexander Gavriliuk
floater is dragged there
2023-11-08SL-20356 EmojiPicker - Implement arrow keys navigationAlexander Gavriliuk
2023-10-31SL-20537 Add hover-preview for My Outfit listMaxim Nikolenko
2023-10-26SL-20401 FIXED Popping out conversation floater second time moves locationMaxim Nikolenko
2023-10-11SL-20419 Receiving new objects or items, etc causes inventory to switch from ↵Alexander Gavriliuk
recent to my inventory tab
2023-10-11SL-20432 BuildfixAlexander Gavriliuk
2023-10-11SL-20432 Filtering My Outfits with big number of items freezes UIAlexander Gavriliuk
2023-10-11SL-20288 Lags in Appearance floater (code format in LLAccordionCtrl)Alexander Gavriliuk
2023-10-11SL-20288 Lags in Appearance floater (code format in LLAccordionCtrl)Alexander Gavriliuk
2023-10-10SL-20288 Lags in Appearance floater (code format in LLAccordionCtrl)Alexander Gavriliuk
2023-10-08Merge branch main into DRTVWR-489Alexander Gavriliuk
2023-10-07SL-20383 Fix scroll locking viewAndrey Kleshchev
2023-10-05SL-20355 Sort completion suggestions by position of the search patternAlexander Gavriliuk
2023-10-05SL-20390 Emoji Completion floater - ignore symbols in shortcodes when ↵Alexander Gavriliuk
searching by pattern
2023-10-05SL-20402 Emoji Completion floater - use vertical scrollbar when neededAlexander Gavriliuk
2023-10-03SL-20383 Fix scroll locking viewAndrey Kleshchev
2023-10-03Merge branch 'main' into DRTVWR-588-maint-WAndrey Lihatskiy
# Conflicts: # indra/llui/lltooltip.h # indra/newview/llinventoryfunctions.cpp # indra/newview/llvovolume.cpp # indra/newview/skins/default/textures/textures.xml