Commit Graph

84379 Commits

Author SHA1 Message Date
Maxim Kartashev
a407d18980 JBR-6117 Wayland: JVM shutdown hang
(cherry picked from commit 20b2eeb0cc)
2025-05-09 02:03:24 +02:00
Dmitry Batrak
0e8d96b3b7 JBR-5961 Wayland: can't switch between projects using menu
prevent using a pointer to destroyed surface

(cherry picked from commit ba1b5cec5f)
2025-05-09 02:03:24 +02:00
Dmitry Batrak
c0b7b994db JBR-5961 Wayland: can't switch between projects using menu
fix typo

(cherry picked from commit 1ee3c83ef0)
2025-05-09 02:03:24 +02:00
Dmitry Batrak
5b3b36417c JBR-5961 Wayland: can't switch between projects using menu
support Window.toFront in Wayland toolkit

(cherry picked from commit b42043930f)
2025-05-09 02:03:24 +02:00
Maxim Kartashev
11f8261a9d JBR-6071 Alpine Linux compilation: error: implicit declaration of function 'pthread_getname_np'
(cherry picked from commit 72722dac36)
2025-05-09 02:03:24 +02:00
Maxim Kartashev
4976b6a2dc JBR-5989 Wayland: jdk_awt_wayland test group
(cherry picked from commit 05ad0c35dd)
2025-05-09 02:03:24 +02:00
Maxim Kartashev
fadd2e396d JBR-6025 Wayland: miscellaneous small improvements
(cherry picked from commit 9dfeaac204)
2025-05-09 02:03:24 +02:00
Alexey Ushakov
1e8218f954 JBR-6045 WLToolkit(Vulkan): Add options to select physical device
Changed access to _name field, minor corrections in verbose print

(cherry picked from commit 36407e978c)
2025-05-09 02:03:24 +02:00
Alexey Ushakov
4aca447b84 JBR-6045 WLToolkit(Vulkan): Add options to select physical device
Implemented -Dsun.java2d.vulkan=True and -Dsun.java2d.vulkan.deviceNumber=n VM options

(cherry picked from commit 7ea0f44a6f)
2025-05-09 02:03:24 +02:00
Maxim Kartashev
8fe2f34c14 JBR-6036 Wayland: Cannot invoke "java.awt.Component.getWidth()" because "popupParent" is null
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)
2025-05-09 02:03:24 +02:00
Nikita Gubarkov
c3e56a40d4 JBR-5973 Implement rendering of no-AA shapes with Vulkan pipeline
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)
2025-05-09 02:03:24 +02:00
Alexey Ushakov
6b3367f7fe JBR-6032 WLToolkit: Uninitialized WLComponentPeer sends paint requests
Protected surfaceAssigned from MT access

(cherry picked from commit e5a3802293)
2025-05-09 02:03:24 +02:00
Alexey Ushakov
39f97a8aea JBR-6032 WLToolkit: Uninitialized WLComponentPeer sends paint requests
Skip sending paint events for not configured peers

(cherry picked from commit 145d6405e4)
2025-05-09 02:03:24 +02:00
Maxim Kartashev
4ca710564f JBR-5968 Wayland: support PERPIXEL_TRANSLUCENT
(cherry picked from commit 35bb2d2489)
2025-05-09 02:03:24 +02:00
Nikita Tsarev
c723b1d141 JBR-5963: Fix RobotKeyboard test and implement getLockingKeyState
(cherry picked from commit 8210596700)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
cbc8f40605 JBR-5962 Wayland: fix the main event loop to allow for secondary queues
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)
2025-05-09 02:03:23 +02:00
Nikita Tsarev
595e0ddc56 Regenerate wakefield-client-protocol using an older wayland-scanner to temporarily fix build problems
(cherry picked from commit 7310c73a94)
2025-05-09 02:03:23 +02:00
Nikita Tsarev
552d2e856c JBR-5676: Support emulating input events in Wakefield
(cherry picked from commit 6544d9d976)
2025-05-09 02:03:23 +02:00
Nikita Tsarev
cde89f7f46 JBR-5900: Fix deadlock when enabling the Wakefield extension
(cherry picked from commit f1712ababd)
2025-05-09 02:03:23 +02:00
Nikita Tsarev
26ff0559e8 JBR-5896: Fix WLToolkit being instantiated twice
(cherry picked from commit 1bdfdc275d)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
bffab72c31 JBR-5861 Wayland: minimum necessary stubs to run IDEA
(cherry picked from commit d8dbfd7249)
2025-05-09 02:03:23 +02:00
Alexey Ushakov
2af98934d7 JBR-5645 Provide basic classes for Vulkan rendering pipeline
Implemented shared classes for cross-platform vulkan implementation and some support for wayland toolkit

(cherry picked from commit 9ea3d2d0b1)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
f529e5a35c JBR-5661 Wayland: implement heavy-weight popup windows
(cherry picked from commit abdfb7231b)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
bcc90bf04d JBR-5666 Wayland: WLToolkit doesn't work with weston
Multiple Wayland buffers support.

(cherry picked from commit 4541c118ff)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
37a0cde5df JBR-5658 Wayland: incorrect scaling of window content
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)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
d1242c881c JBR-5657 Wayland: sometimes there's a deadlock at the start
Don't exit from toolkit initialization until all the necessary
information has been received from the Wayland server.

(cherry picked from commit 453aa66d79)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
bc628feab6 JBR-5655 java/awt/Toolkit/Wayland/WaylandToolkit.java: WLToolkit not found
WLToolkit made operational in headless mode

(cherry picked from commit 5679e134a7)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
5f694be39d Wayland: fix AWT initialization on macOS
(cherry picked from commit 382e6c6989)
2025-05-09 02:03:23 +02:00
Maxim Kartashev
f9dde874ce Wayland: fixed build errors on macOS
(cherry picked from commit 82fe989dd7)
2025-05-09 02:03:22 +02:00
Maxim Kartashev
878b6ab0eb Wayland: fixed build errors with older versions of Wayland
(cherry picked from commit d6150b8c8b)
2025-05-09 02:03:22 +02:00
Alexey Ushakov
d4c21f5610 Initial version of WLToolkit and Vulkan support
Co-authored-by: Dmitry Batrak <Dmitry.Batrak@jetbrains.com>
Co-authored-by: Nikita Gubarkov <nikita.gubarkov@jetbrains.com>
Co-authored-by: Maxim Kartashev <maxim.kartashev@jetbrains.com>
(cherry picked from commit 2e26de3c45)
2025-05-09 02:03:22 +02:00
Vitaly Provodin
ea49796d7a Update README.md
(cherry picked from commit 49c5e7dd3a)
2025-05-09 02:03:22 +02:00
Vitaly Provodin
e641ee8435 JBR-7532 upgrade alpine up to 3.14, specify versions of installing packages, and deploy the latest available jdk20 (same as in jbr21)
(cherry picked from commit 794eab0e1f)
2025-05-09 02:03:22 +02:00
Vitaly Provodin
b00ce7b932 JBR-7456 add regression test checking if implementations of all available the random number generator algorithms can be instantiated, including the default one
(cherry picked from commit 3950e80ba1)
2025-05-09 02:03:22 +02:00
Nikita Tsarev
4702f9c8b0 JBR-7529: Explicitly check for press-and-hold in performKeyEquivalent
(cherry picked from commit 9fadadf039)
2025-05-09 02:03:22 +02:00
Vitaly Provodin
7d4f78b770 JBR-7517 build JBR artefacts with CDS archives
(cherry picked from commit 0b5462b3ec)
2025-05-09 02:03:22 +02:00
Vitaly Provodin
f802a696fc Update README.md
(cherry picked from commit d27df085c7)
2025-05-09 02:03:22 +02:00
bourgesl
822375d831 JBR-7460: fixed (macos) MTLTexturePool GC implementation: minor syntax updates from JBR-7461
(cherry picked from commit 713162c6b5)
2025-05-09 02:03:22 +02:00
Nikita Tsarev
1e3d6c21ba JBR-7426: Fix cancelling press-and-hold causing some future key events being swallowed
(cherry picked from commit a07d5e4a60)
2025-05-09 02:03:22 +02:00
bourgesl
96b529bcc1 JBR-7460: fixed (macos) MTLTexturePool GC implementation to release texture memory more promptly (regular young GC freeing not reused textures since 15s) + unified API with new generic AccelTexturePool (C) to be shared with the coming vulkan pipeline (linux)
(cherry picked from commit ea12ccdf5e)
2025-05-09 02:03:22 +02:00
Dmitrii Morskii
781a47b6f1 JBR-6772 handled case with adding new timers after VM was suspended
(cherry picked from commit 1dd81b186b)
2025-05-09 02:03:22 +02:00
Maxim Kartashёv
d42227fcd6 JBR-5956 Provide more details on assertion failure
Use JNU_RUNTIME_ASSERT(env, cond, msg) defined in jni_util.h
to crash JVM when 'cond' is not true with the given message
and source location information in the fatal error log.

(cherry picked from commit fd9bf2c37a)
2025-05-09 02:03:22 +02:00
Sergey Shelomentsev
ab4e997481 Update jbr-api version to 1.0.2
(cherry picked from commit 9c4a2ac50a)
2025-05-09 02:03:21 +02:00
Stanislav Dombrovsky
270a9b7ebd Fix rendering of HTML list dots + better vertical align for them.
(cherry picked from commit fa4a404533ba1ef638fe523adc74391aee8a3ebf)

(cherry picked from commit 9f079c66e9)
(cherry picked from commit baf2f0b73f)
2025-05-09 02:03:21 +02:00
Nikita Tsarev
bab81a0235 JBR-6588: JBR API for inspecting certain properties of KeyEvents
(cherry picked from commit cf2abf34d7)
2025-05-09 02:03:21 +02:00
Nikita Tsarev
f0f5c8079b JBR-7449: Fix press-and-hold cancel keys not being swallowed by JBR
(cherry picked from commit a0dbdff2b0)
2025-05-09 02:03:21 +02:00
Alexey Ushakov
56eae31080 JBR-6545 java/awt/Mixing/AWT_Mixing/JProgressPaneOverlapping.java fails by time out (sun.java2d.metal.MTLLayer.blitTexture)
Moved test frame by some offset to avoid interaction with mac menu bar

(cherry picked from commit 7d3688ab93)
2025-05-09 02:03:21 +02:00
Artem Bochkarev
b86b0db9d0 JBR-5405: supported BufImgSurfaceData
(cherry picked from commit 3c2d26f834)
2025-05-09 02:03:21 +02:00
Maxim Kartashev
52739b5990 JBR-6830 Poor performance with KDE Plasma 6 X11
Use -Dwatch.desktop.geometry=false as a workaround until the KWin issue
is fixed

(cherry picked from commit d90f0e524b)
2025-05-09 02:03:21 +02:00
Artem Bochkarev
5d401e07cb JBR-4430 Fixed execution permissions on Linux
(cherry picked from commit f3896017f0)
2025-05-09 02:03:21 +02:00