Commit Graph

276 Commits (ff8dcc23bfde402feb4c33b74194852a730bf5bb)

Author SHA1 Message Date
Mnikolenko Productengine 41d24952ff Merge branch 'main' into DRTVWR-539
# Conflicts:
#	indra/integration_tests/llui_libtest/CMakeLists.txt
#	indra/newview/llfloateravatarrendersettings.cpp
2023-03-31 17:17:21 +03:00
Andrey Kleshchev 472ecc8088 SL-18999 IME disabling should be called in window's thread
For some reason positioning IME window works fine, but disabling and enabling ime works from window's thread only
2023-01-19 01:45:57 +02:00
Andrey Kleshchev 89f3bf6c13 SL-18985 Crash at std::basic_string::erase 2023-01-18 19:20:36 +02:00
Andrey Lihatskiy f9866a3543 Merge branch 'main' into DRTVWR-573-maint-R
# Conflicts:
#	autobuild.xml
#	indra/newview/llagent.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llimview.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llpanelmediasettingsgeneral.cpp
#	indra/newview/pipeline.cpp
2023-01-12 04:37:42 +02:00
Mnikolenko Productengine 553a98723b Merge branch 'main' into DRTVWR-539
# Conflicts:
#	doc/contributions.txt
#	indra/newview/llappviewer.cpp
#	indra/newview/skins/default/colors.xml
2022-12-13 08:05:03 +02:00
Maxim Nikolenko d01f7afff2
SL-18713 fix crash in handleCompositionMessage (#12) 2022-11-25 18:16:31 +02:00
Mnikolenko Productengine a53ccb2379 SL-18136 fix for Japanese IME 2022-11-02 19:38:01 +02:00
Mnikolenko Productengine 717b34f53f Merge branch 'master' into DRTVWR-539
# Conflicts:
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llviewercontrol.cpp
2022-10-21 14:42:53 +03:00
Andrey Lihatskiy 97b676b60f Merge branch 'master' into DRTVWR-565-maint-P 2022-10-20 21:43:54 +03:00
Andrey Kleshchev aa5c4d45aa SL-17719 Windows support for absolute mouse positioning #2
Better touch screen handling
2022-08-16 00:09:50 +03:00
Andrey Kleshchev ff895e96b2 SL-17719 Windows support for absolute mouse positioning
For virtual machines and touch screens
Also raw input is not subjected to mouse speed
2022-08-14 21:14:39 +03:00
Mnikolenko Productengine b0e9840648 Merge branch 'master' into DRTVWR-539 2022-06-29 21:03:15 +03:00
Andrey Lihatskiy 2e837e5389 Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts:
#	doc/contributions.txt
#	indra/newview/llviewercontrol.cpp
2022-06-29 20:51:08 +03:00
Mnikolenko Productengine ba9bff5b9b SL-17541 Show the message that user is currently at maximum FPS 2022-06-08 01:21:42 +03:00
Mnikolenko Productengine ff65e23f20 SL-17515 FIXED Extreme Mouse Sensitivity for Certain Actions 2022-06-03 14:08:04 +03:00
Andrey Kleshchev ce0286c33b SL-17474 Device context not properly released at shutdown 2022-05-30 15:02:03 +03:00
Andrey Kleshchev da6f4204b7 SL-17124 make sure window thread wakes up to proces 'quit' message 2022-04-29 22:18:20 +03:00
Andrey Kleshchev 904b16a0a7 SL-17124 switchContext and loadShaderFile crashes
- Do not try initializing shaders if requirements are not met or if window does not exist
- Warn user before closing window. Situation is unexpected, there is chance of more issues, like a freeze or a crash on close()
- mHasMultitexture is a solid requirement, if it is not present, we won't be able to run
2022-04-29 19:41:22 +03:00
Andrey Kleshchev ce4c694b66 Merge branch master (D540) into DRTVWR-546
# Conflicts:
#	indra/llcommon/llsdutil.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolwater.cpp
2022-04-18 23:42:39 +03:00
Dave Houlton e76a3b12e6 SL-17074 fix ALT-F4 handling without impacting alt-zoom 2022-03-29 11:36:28 -06:00
Dave Houlton 578087b7bd SL-17074 Fix Alt-F4 handling bug 2022-03-24 11:21:25 -06:00
Andrey Kleshchev 97a103255e Merge branch 'master' (DRTVWR-557) into DRTVWR-546
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/cmake/GLOD.cmake
#	indra/llcommon/tests/llprocess_test.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/viewer_manifest.py
2022-03-01 13:41:42 +02:00
Andrey Lihatskiy 73eec89131 Merge branch 'master' into DRTVWR-540-maint
# Conflicts:
#	autobuild.xml
#	indra/llcommon/llsys.cpp
#	indra/newview/app_settings/key_bindings.xml
#	indra/newview/llfloatereditextdaycycle.cpp
2022-02-28 21:54:21 +02:00
Dave Parks 0d6aa3c0fe SL-16815 Remove frame stalls from occlusion queries, bumpmap updates, and querying for available video memory. 2022-02-17 22:52:23 +00:00
Ptolemy 8c823b75c0 SL-16606: Add profiler category WIN32 2022-01-14 11:50:22 -08:00
Mnikolenko Productengine 3ac21ebbf6 SL-16454 FIXED Performance viewer login screen is black 2021-12-17 13:07:23 +02:00
Mnikolenko Productengine c21dad8207 SL-16467 FIXED "Keyboard layout" is not switched 2021-12-13 12:14:14 +02:00
Runitai Linden 7683477547 SL-16480 Followup -- fix for unintialized mRect/mClientRect and bad getClientRectInScreenSpace 2021-12-09 16:44:44 -06:00
Runitai Linden 9689e606f4 SL-16480 Fix for window not saving its position on exit. 2021-12-09 14:01:41 -06:00
Dave Houlton 68e09edad0 SL-16386 remove references to (const true) LLGLSLShader::sNoFixedFunction 2021-11-30 17:04:35 -07:00
Nat Goodspeed 0b066539fe DRTVWR-546, SL-16220, SL-16094: Undo previous glthread branch revert.
Reverting a merge is sticky: it tells git you never want to see that branch
again. Merging the DRTVWR-546 branch, which contained the revert, into the
glthread branch undid much of the development work on that branch. To restore
it we must revert the revert.

This reverts commit 029b41c041.
2021-11-24 10:47:54 -05:00
Nat Goodspeed d71e0a6d47 SL-16094, SL-16400: Merge branch 'DRTVWR-546' into glthread 2021-11-23 21:23:45 -05:00
Nat Goodspeed 67ace0df99 SL-16400: Address a couple shutdown crashes.
It can happen that we try to post() work for LLWindowWin32's window thread
after the thread's WorkQueue has been closed.

Also, instead of giving the "General" ThreadPool static lifespan, put it on
the heap, anchored with a static unique_ptr.
2021-11-23 20:48:44 -05:00
Nat Goodspeed 2b96f89c2a SL-16400: Add ThreadPool::start() method, and call it.
It's sometimes important to finish other initialization before launching the
threads in the ThreadPool, so make that an explicit step. In particular, we
were launching the LLImageGL texture thread before initializing the GL
context, resulting in all gray textures.
2021-11-23 20:39:32 -05:00
Nat Goodspeed 6d36038e40 Merge branch 'glthread' of ssh://bitbucket.org/lindenlab/viewer into glthreadx 2021-11-23 15:41:46 -05:00
Nat Goodspeed 37900e593d SL-16094: Fix second startup hang.
Add LLWindowWin32Thread::Post(), like post() except it uses PostMessage() to
send the work item to the window thread. Support this in mainWindowProc().

Move LLWindowWin32::recreateWindow()'s destroy_window_handler() call onto the
window thread. Delaying destruction of the old HWND ensures that we can use
PostMessage() and GetMessage() with that HWND to pass the lambda work item.
Moreover, it's likely to be less buggy to call DestroyWindow() on the same
thread that created the window.

Make recreateWindow()'s window thread lambda bind the window class parameters
by value, rather than binding 'this' and back-referencing LLWindowWin32
members.

Make recreateWindow() construct the window thread lambda and then decide
whether to pass it to the window thread using post() or Post(), depending on
whether we have a current HWND -- therefore whether the window thread is
blocked on GetMessage(). That means we can eliminate the kickWindowThread()
call.

Make destroy_window_handler() accept HWND by value rather than by non-const
reference. Since it doesn't attempt to modify the caller's value, this is a
better match for the function's semantics anyway -- but importantly, it lets
us pass a const HWND.
2021-11-23 15:40:36 -05:00
Runitai Linden 9b0d8c7e62 SL-16094 More profile hooks for threading code, remove redundant wglCreateContextAttribs call 2021-11-22 18:42:56 -06:00
Dave Parks 28f9fb06a9 SL-16289 Rigged mesh rendering overhaul 2021-11-20 18:49:19 +00:00
Nat Goodspeed a633efdc0b SL-16094: In LLWindowWin32::recreateWindow(), kick window thread
before blocking on the pending future. Otherwise the window thread can remain
blocked in a GetMessage() call and deadlock the app.
2021-11-15 14:34:30 -05:00
Dave Houlton 029b41c041 Revert "SL-16220: Merge branch 'origin/DRTVWR-546' into glthread"
This reverts commit 5188a26a85, reversing
changes made to 819088563e.
2021-11-15 09:25:35 -07:00
Nat Goodspeed 1a39a8f7d9 Merge branch 'DRTVWR-546' into glthread 2021-11-10 10:28:58 -05:00
Nat Goodspeed 214d8d40c1 SL-16094: Statically link to Windows IMM32.LIB.
llwindowwin32.cpp's LLWinImm class used to dynamically load IMM32.DLL and
populate its methods using GetProcAddress(). That was to support Windows XP.
Since we've dropped Windows XP, use static linking instead, with dramatically
fewer lines of code (and less of a thread safety alarm trigger).

We retain the LLWinImm wrapper class only as a hook for Tracy instrumentation.
2021-11-10 10:17:12 -05:00
Mnikolenko Productengine 768b7a4d33 SL-16330 Clean up vertical sync handling, add to UI 2021-11-09 17:17:49 +02:00
Nat Goodspeed 08336bb469 SL-16094: Zap thread safety land mine; thin PostMessage() calls.
LLWindowWin32::mWndProc was a public WNDPROC member. If set non-NULL,
mainWindowProc() would call that before falling into its own handler code. But
now, mWndProc would be called on the window thread instead of on the main
thread. Running arbitrary callback code on the window thread could cause all
sorts of problems.

It could be made safe by posting the callback call to the "mainloop" WorkQueue
for execution on the main thread. But as no code actually references it,
delete it instead.

Per DaveP, the recent change to LLWindowsWin32Thread::post() could end up
calling PostMessage() many times per frame, with nontrivial overhead.
Reinstate the more selective code that calls PostMessage() with the dummy
message (to bust us out of GetMessage() to check pending window-thread work
requests) at most once per frame.
2021-11-08 15:15:56 -05:00
Nat Goodspeed c7af4921db SL-16094: Use ThreadPool for LLWindowWin32Thread.
Move the whole LLWindowWin32Thread class inside LLWindowWin32, and make it a
struct. Migrate the struct declaration to llwindowwin32.cpp.

Derive it from ThreadPool, which provides the WorkQueue. Use runPending()
instead of manually popping and running individual queue items.

Make its post() operation always PostMessage(bogus) whenever we put an entry
in the WorkQueue, so we won't remain blocked in GetMessage().

Instead of storing a back pointer to the LLWindowWin32 instance, store the
relevant HWND and HDC in LLWindowWin32Thread itself to avoid cross-thread
timing problems.

Extract both instances of a large duplicated block of LLWindowWin32 code to a
new recreateWindow() method, and call it in those places. Per the TODO, use a
std::future to pass the new HWND and HDC back to LLWindowWin32 -- but also
store them locally on the LLWindowWin32Thread instance.
2021-11-05 17:20:11 -04:00
Mnikolenko Productengine b6afa7f7dd SL-16288 FIXED Dragging a file across the viewer cancels the drag and freezes the File Explorer 2021-11-05 17:48:40 +02:00
Dave Parks 68b75be652 SL-9436 Don't render 100% transparent objects. 2021-10-28 22:09:22 +00:00
Vir Linden ba3459f77f Merged DRTVWR-546 into SL-15999 2021-10-25 15:55:06 +00:00
Brad Payne (Vir Linden) e5cd9cb90f merge 2021-10-22 18:11:48 +01:00
Dave Parks 5553d61421 SL-16203 Fix for wonky handling of mouse deltas. 2021-10-22 17:01:33 +00:00