Also fixed the keyboard repeat manager so that it does not prevent
application from shutting down.
Also improved fullscreen support.
(cherry picked from commit a36c9604b1)
A partial solution. Cases not still covered:
* Alt+tab from the app and back should keep popup focused if it was focused initially
* Mouse clicks between popup and owner should transfer focus as expected
(cherry picked from commit 903231dc50)
Not all POPUP Window's have their parent set. And only those who do
shall be treated as popups in the Wayland's sense.
(cherry picked from commit 86080923bb)
Get rid of maxTextureSize in Vulkan code. This concept was introduced to fix macOS-specific bugs and don't map well to Vulkan implementation, as this value is tied to specific device and texture format, so get rid of it for now and see whether we need it at all.
Refactored native surface data hierarchy. There was a C-style "inheritance" model with VKSDOps having an SurfaceDataOps as its first member and conversions back and forth between them. And then also privOps - pointer to the platform-specific part (WLVK). This was refactored into plain inheritance: SurfaceDataOps -> VKSurfaceData -> VKSwapchainSurfaceData -> WLVKSurfaceData
State management, synchronization & layout transition. Now using dynamic rendering and synchronization2 extensions.
Each device has a single timeline semaphore (basically 64-bit counter), monotonically increasing as device executes our commands, allowing us to track the state of the submitted batches and reuse resources which are no longer in use.
Split command recording into primary and secondary command buffers.
This allows us to record commands "in the past", before current render pass started, which gives possibility for some heavy optimizations:
1. When we suddenly need some texture in the middle of the render pass - no need to stop render pass in order to insert necessary synchronization - we can do it as if we knew it beforehand.
2. When we draw something and then clear the surface - just erase all commands inside current render pass we recorded earlier, so the actual drawing will never happen.
Shaders are compiled with glslc or glslangValidator and bytecode is inlined directly into libawt_wlawt
Memory management via VMA, vertex buffer pool, shader push constants.
Other refactoring.
(cherry picked from commit 9ceaebbb60)
Return READ_RESULT_FINISHED_NO_EVENTS from WLToolkit.readEvents() in
case of poll returning with no new data (i.e. via timeout).
(cherry picked from commit 2b68207e79)
The buffer scale is changed atomically with the size.
WLGraphicsConfig made immutable and is re-created when scaling changes.
WLGraphicsDevice is also re-created when its position changes.
(cherry picked from commit 2d0d950d5b)
Don't exit from toolkit initialization until all the necessary
information has been received from the Wayland server.
(cherry picked from commit 453aa66d79)