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

Jayathirth D V jdv at openjdk.java.net
Wed Jun 30 14:26:06 UTC 2021


On Wed, 30 Jun 2021 11:36:18 GMT, Ajit Ghaisas <aghaisas 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.
>
> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 88:
> 
>> 86: 
>> 87:     if (self.nextDrawableCount != 0) {
>> 88:         [self stopDisplayLink];
> 
> Please check invoking stopDisplayLink at this place.  If a Drawable is not available, we should return from here but recheck after 16ms. A drawable might be made available on subsequent attempts.
> 
> Stopping DisplayLink at other invalid cases makes sense.

@aghaisas Thanks for the review. Redraw of static content is driven by setNeedsDisplay, because we stop CVDisplayLink once final blit is done. Also with preliminary testing i see that we are not hitting this condition at all after CVDisplayLink is enabled. We still have a verification task under https://bugs.openjdk.java.net/browse/JDK-8258583 . Stopping or not stopping CVDisplayLink at this place is not causing any change. I will go ahead and remove stopDisplayLink at this place, in future if we hit this code because of some boundary condition we can enable it and verify.

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

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


More information about the 2d-dev mailing list