[OpenJDK 2D-Dev] [jdk17] RFR: 8267602: [macos] [lanai] java/awt/PrintJob/Text/stringwidth.sh doesn't exit on cancelling print dialog

Sergey Bylokhov serb at openjdk.java.net
Tue Jun 29 23:34:05 UTC 2021


On Tue, 29 Jun 2021 17:34:00 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

> Final blit operation in MTLLayer.blitTexture() is driven by CVDisplayLink in Metal.
> In this test case we are hitting an invalid condition because of which we exit from MTLLayer.blitTexture(), but we are not stopping the CVDisplayLink. This is causing the CVDisplayLink callback to run in loop. Fix is to stop CVDisplayLink when we return without completing final blit operation in MTLLayer.blitTexture().
> 
> Sanity and performance analysis is green. More details in JBS.

Please confirm that mach5 is green.

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 286:

> 284:     if (layer == NULL || ctx == NULL) {
> 285:         J2dTraceLn(J2D_TRACE_VERBOSE, "MTLLayer_blit : Layer or Context is null");
> 286:         [layer stopDisplayLink];

What happens if we exit before this "blitTexture" is called? Do not we need to stop(w/o possibility to restart it) that thread on toolkit shutdown or something like this?

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

PR: https://git.openjdk.java.net/jdk17/pull/175


More information about the 2d-dev mailing list