Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBR-7700 java.io over java.nio #508

Open
wants to merge 1,431 commits into
base: main
Choose a base branch
from

Conversation

vladimirlagunov
Copy link
Collaborator

No description provided.

@vprovodin
Copy link
Collaborator

One regression was detected java/awt/print/PrinterJob/PrintToDir.java stably fails with these changes and successfully passes on the main branch
Here is a piece of the failure log

#section:main
----------messages:(7/259)----------
command: main PrintToDir
reason: User specified action: run main PrintToDir 
started: Thu Feb 06 07:46:44 UTC 2025
Mode: othervm
Additional options from @modules: --add-modules java.desktop
finished: Thu Feb 06 07:46:46 UTC 2025
elapsed time (seconds): 2.529
----------configuration:(3/40)----------
Boot Layer
  add modules: java.desktop

----------System.out:(6/131)----------
Testing file name = "."
No print service found.
PrintJob passed.
Testing file name = ""
No print service found.
Printing completed
----------System.err:(15/896)----------
2025-02-06 07:46:46.375 java[1230:9727] +[IMKClient subclass]: chose IMKClient_Modern
java.lang.RuntimeException: PrintJob::IllegalArgumentException expected but not thrown. 
TEST FAILED
	at PrintToDir.doPrintJob(PrintToDir.java:91)
	at PrintToDir.main(PrintToDir.java:129)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1447)

JavaTest Message: Test threw exception: java.lang.RuntimeException: PrintJob::IllegalArgumentException expected but not thrown. 
TEST FAILED
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: PrintJob::IllegalArgumentException expected but not thrown. TEST FAILED

mkartashev and others added 29 commits February 6, 2025 19:43
Popup's positioner size has to be in sync with popup's buffer size

(cherry picked from commit 5d67a13)
- Separate instance and device-specific function tables
- Avoid using device from global context when possible
- Set up debug logger

(cherry picked from commit af4eb8b)
…r rendering (JetBrains#426)

Refactored rendering code. Provided common implementation for fill and draw operations.

(cherry picked from commit 902f65c)
…#428)

Moved shared VkRenderPass to the logical device

(cherry picked from commit 3d782ed)
Check if all non-optional interfaces are supported before actually
starting to run

(cherry picked from commit 632a0ac)
 - based on common AccelTexturePool
 - new VKTexturePool instance in VKLogicalDevice
 - fixed SIGSEGV in VKImage dispose
 - store device in TPI
 - indentation fixes
 - merged with latest changes for JBR-7460
 - use (ATexturePoolLock_init)(void)
 - fixed logs in lock implementations + fixed indentation
 - fixed MTLTexturePool to pre-processor conditions (not runtime) on USE_ACCEL_TEXTURE_POOL

(cherry picked from commit 5515b0f)
* Renamed VKLogicalDevice to VKDevice for conformance and convenience.
* Refactored device->device to device->handle for clarity.

(cherry picked from commit aba56fd)
(cherry picked from commit 00f213d)
(cherry picked from commit 0d5aea9)
… timeout

Excluded the test from jdk_awt_wayland as it can't be made to work
under Wayland.

(cherry picked from commit 7a3077d)
Certain Wayland compositors (wlroots) invalidate xdg_surface after window with popup loses focus. Subsequent attempts to
commit the popup window fail with protocol error "xdg_surface has never been configured".

Handle popup_done event by hiding the popup window. Also emit WINDOW_CLOSING event as otherwise focus remains on the popup parent.

Co-authored-by: Maxim Kartashёv <[email protected]>
(cherry picked from commit 873a085)
- Added proper synchronization and image layout transitions.
- Refactored VKRenderer to hold per-device rendering context. Isolated surface rendering contexts.
- Implemented reusing of command buffers and semaphores
- Fixed surface resize, made surface initialization more robust.
- Added on-demand pipeline creation for actual surface formats.
- Added missing destruction logic.
- Added macros for easy checking of return codes, logging with source code location.
- Moved implementation details out of headers where possible. Stripped dead code.
- Implemented consistent OOM strategy from dynamic arrays and ring buffers.

(cherry picked from commit 91aafbe)
Implemented reference counting for shared MTLContext objects. Supported multiple display links per MTLContext. Also, works for macOS version < 10.13

(cherry picked from commit c6aa7f1)
(cherry picked from commit 170a7cf)
To fix missing mouse entered/exited events when
using rounded corners, we keep track of mouse moved events. When a mouse moved event is detected, and the current peer under the cursor belongs to a different window, we send fake mouse entered/exit events to the old and new windows. We also filter late mouse exited events.

The workaround is enabled by default with the VM option "awt.mac.enableMouseEnteredExitedWorkaround" to disable it in case something breaks.

About the test:
Use the robot to find the points when the mouse
entered event is sent to the popup when the mouse
enters through a rounded corner, and the similar
point for entering the outer window when exiting
through such a corner.

Once the points are found, move the mouse back
and forth to that point, but not beyond.
The correct behavior is that when the mouse
enters the popup, a mouse exited event is sent
to the outer frame and vice versa.
Therefore, every mouse entered/exited event
should be received exactly once.

Use reflection to set the rounded corners,
as JBR API isn't available in tests.

(cherry picked from commit 0b5beaf)
@vladimirlagunov vladimirlagunov force-pushed the main-JBR-7700-java-io-via-nio branch from cc073b4 to 0915521 Compare February 27, 2025 18:31
…estEmptyPathForByteStream on Windows

It throws AccessDeniedException on Windows. Probably, semantics of the particular corner case of opening the current directory as a byte stream differs on Windows and on Posix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.