RFR: 8304825: MacOS metal pipeline - window isn't painted if created during display sleep
Phil Race
prr at openjdk.org
Fri Apr 7 17:06:48 UTC 2023
On Fri, 7 Apr 2023 11:49:50 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:
>> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 102:
>>
>>> 100:
>>> 101: [self stopDisplayLink];
>>> 102: }
>>
>> I'm assuming this is something we should have done already to save wasted work ?
>> i.e if the screen is asleep, we don't need to be connected to it and updating windows ?
>> But I see the same stopDisplayLink call in the wakeup code ... any issues with the extra call there ?
>
>> I'm assuming this is something we should have done already to save wasted work ?
> i.e if the screen is asleep, we don't need to be connected to it and updating windows ?
>
> We start the DisplayLink from Metal RenderQueue whenever there is something to be painted from back buffer to the window buffer. Once the window buffer is painted in a DisplayLink callback, we stop the DisplayLink.
> We were not stopping the DisplayLink on screen sleep event. This is what this PR adds.
>
>> But I see the same stopDisplayLink call in the wakeup code ... any issues with the extra call there ?
>
> I have added that call as a sanity before releasing the Displaylink. It will be a no-op if DisplayLink is not running.
ok
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13375#discussion_r1160837063
More information about the client-libs-dev
mailing list