-
Notifications
You must be signed in to change notification settings - Fork 254
JBR-8118 TextureWrapperImage for MTLTexture #513
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
Draft
ujpv
wants to merge
10,000
commits into
jbr21
Choose a base branch
from
kharitonov/shared_textures_rebase
base: jbr21
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,217,819
−2,147,907
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
Author
mkartashev
reviewed
Feb 11, 2025
src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java
Outdated
Show resolved
Hide resolved
mkartashev
reviewed
Feb 11, 2025
src/java.desktop/share/classes/com/jetbrains/desktop/image/TextureWrapperImage.java
Show resolved
Hide resolved
avu
requested changes
Feb 11, 2025
src/java.desktop/macosx/classes/sun/java2d/MacosxSurfaceManagerFactory.java
Outdated
Show resolved
Hide resolved
YaaZ
reviewed
Feb 11, 2025
src/java.desktop/share/classes/com/jetbrains/desktop/image/TextureWrapperImage.java
Outdated
Show resolved
Hide resolved
f40d316 to
6dc24d6
Compare
mkartashev
requested changes
Feb 17, 2025
src/java.desktop/share/classes/com/jetbrains/desktop/SharedTextures.java
Outdated
Show resolved
Hide resolved
src/java.desktop/share/classes/com/jetbrains/desktop/image/TextureWrapperImage.java
Outdated
Show resolved
Hide resolved
src/java.desktop/unix/classes/sun/java2d/UnixSurfaceManagerFactory.java
Outdated
Show resolved
Hide resolved
mkartashev
approved these changes
Feb 19, 2025
9f997c9 to
eb58b2d
Compare
a4f70d6 to
cff0f0e
Compare
eacb1fe to
c09273b
Compare
…fferedImages This duplicates my OpenJDK PR, wait till it's resolved in upstream.
Avoid performing blocking I/O while holding a lock
…-function key combinations [WLToolkit]
* Add null checks for variables that can have null values to prevent hard crash * Add missing CHECK_EXCEPTION after JNI call * Add missing DeleteLocalRef for axComponent (cherry picked from commit 96fcd9e)
This patch implements a workaround for a bug that exists on KWin 6.5. For some reason, KWin sends a wl_data_source.action(0) event immediately after wl_data_source.dnd_drop_finished(). This makes the drag source think that the DnD operation failed, even though it succeeded. The workaround it to ignore the wl_data_source.action() events after a successful wl_data_source.dnd_drop_finished() In addition to this, this patch also fixes some inconsistency with translating between AWT and Wayland DnD operation masks. This doesn't have any visible effect though, since the mask values happen to be the same.
This patch adds a call to wl_data_offer.finish() upon a successful completion of a drag-and-drop operation, as well as more synchronized annotations in WLDataOffer, to match the existing ones. Calling finish() doesn't seem to be required by most compositors when performing drag-and-drop, at least within the same window. Other toolkits, such as Qt, only call it when dealing with cross-application drag-and-drop. In the interest of maximal compatibility, this patch implements calling finish() always when a drag-and-drop operation succeeds.
Use -Dsun.awt.wl.WindowDecorationStyle=server to activate
KWin does not accept the serial number from a "keyboard enter" event in a window activation request, while a recent input event serial is OK. Gnome, however, requires the "keyboard enter" event serial.
…ling prevention >= Medium
Shortly said, we don't need to handle recursive invocations of the `java.io` to nio adapters, while this recursion leads to problems. # Problem Since we're not allowed to modify public API of Java classes, an unreliable workaround `IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL` had been introduced. This trick lets us pass some object into a called function without adding a new function argument. The trick backfired at the following code: ```java // at java.base/java.io.IoOverNioFileSystem.initializeStreamUsingNio (simplified code) IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL.set(owner); return initializeStreamsUsingNio0(owner, nioFs, file, nioPath, optionsForChannel, channelCleanable); // at java.base/java.io.IoOverNioFileSystem.initializeStreamsUsingNio0 channel = nioFs.provider().newFileChannel(nioPath, optionsForChannel); ``` The intention of setting `PARENT_FOR_FILE_CHANNEL_IMPL` is to path `owner` inside a constructor of `sun.nio.ch.FileChannelImpl` which may be called by `newFileChannel(nioPath, optionsForChannel)`. The implementation of `newFileChannel` in IntelliJ triggered class loading. The classloader of IntelliJ triggered the call `java.nio.file.Files.readAllBytes`. The latter code also invoked the constructor of `FileChannelImpl`, and the constructor got from the thread-local variable the value for the field `parent`. That value was supposed to be passed to a different invocation of the constructor. The observable result of this bug was a `NullPointerExceptions` from `java.io.FileOutputStream.close`. Hypothetically, this bug could also lead to closing file descriptors earlier as expected in other unpredictable places. # Rejected approaches * The cleanest solution could be passing specific function arguments through function arguments. However, we may neither create a new public function in the module `java.base`, nor add an argument to an existing one. Thus, we have to keep dealing with thread-local variables. * To hold several values in the thread-local variable. In this case, the constructor of `FileChannelImpl` should somehow choose the right value from the list. The only possible way for filtering values is by the provided path. It doesn't look like a performant and reliable solution. # Chosen solution This commit disables recursive invocations of `java.io` from `java.nio` adapters. The chosen solution is tied to specifics of IntelliJ. The reason for introducing java.io over java.nio adapter was to be able to access files from remote machines without rewriting old code. It is not expected that an implementation of `java.nio.file.spi.FileSystemProvider` accesses the file system using `java.io`. The only imaginable way to get a `java.io` call from `java.nio` is class loading. In case of IntelliJ, it's assumed that the class loader never accesses classes and jars from a remote machine.
Updates the CI build scripts to look for wayland protocols in /opt/wayland-protocols
…n Linux in the 2025.2.5 version JBR-9714: Horizontal scroll stopped working after 2025.2.5 update JBR-9715: Horizontal touchpad scroll stopped working after 2025.2.5 update - Disabling the part of JDK-8351907 that disables all mouse extra buttons for XWayland GNOME of version >= 47. - Adding a manual test for mouse back and forth buttons. (cherry picked from commit caf64ee) (cherry picked from commit 6efade4)
This reverts commit f25d35a.
This reverts commit 7d3c3b3.
…tMethodZwpTextInputV3 logger is enabled Resetting the text iterator of each InputMethodEvent after it gets logged. (cherry picked from commit 3355214)
This patch implements support for the xdg_toplevel_icon_v1 protocol. The image choosing logic is just to pick the largest square image for now. The image scale factor is also not set, since it's unclear if it's needed and how it interacts with multi-monitor setups. NOTE: this patch introduces a dependency on wayland-protocols 1.37+.
Use getRootPane()
.putClientProperty("wlawt.popup_position_unconstrained", Boolean.TRUE)
to enable unconstrained popup positioning.
9b43b01 to
0f7f79e
Compare
0f7f79e to
82af9cd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.