Integrated: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1

Alexander Zvegintsev azvegint at openjdk.org
Wed Oct 11 22:20:18 UTC 2023


On Tue, 3 Oct 2023 10:30:50 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

> The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale.
> 
> This changeset includes:
> 
> * sun.java2d.uiScale value is now taken into account
> * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system.
> Now we take that into account and resize the image accordingly.
> * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution.
> * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported.
> 
> Following tests are no longer failing on Wayland:
> java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java
> java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java
> java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java
> 
> Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling).

This pull request has now been integrated.

Changeset: 387896fb
Author:    Alexander Zvegintsev <azvegint at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/387896fb349f341081c6075fb7169e9f3a0919cd
Stats:     236 lines in 8 files changed: 168 ins; 48 del; 20 mod

8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1

Reviewed-by: prr, honkar

-------------

PR: https://git.openjdk.org/jdk/pull/16027


More information about the client-libs-dev mailing list