<i18n dev> RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint
Jeremy
duke at openjdk.org
Tue Mar 21 21:23:44 UTC 2023
On Thu, 16 Mar 2023 17:27:23 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> I'm confident about the new test case for this ticket, but the resolution is more invasive than I'd like. (It works, though.)
>>
>> In short:
>> This introduces a new RenderingHint (in SunHints) to bypass the call in Window to `gg2d.fillRect(0, 0, getWidth(), getHeight());`
>>
>> I left more detailed notes here about the proposed resolution:
>> https://github.com/openjdk/jdk/commit/1991fdac5dbf76ddaf73cc78a9f7c38370c9674c
>>
>> I'm open to suggestions if anyone has a more elegant proposal to prevent the monitor from refreshing too soon?
>
> For the possible "synchronization" change, note that on macOS the rendering to the Window is always done via backbuffer which then blits to the CALayer. We can try to delay the blit until the window is fully rendered.
@mrserb I pushed some updates that I think approach this as you recommended.
However:
How about instead I replace this branch with this approach: https://github.com/openjdk/jdk/compare/master...mickleness:jdk:JDK-8303950-alt-3?expand=1
In both branches I also added a new test case `bug8303950_legacyWindowPaintBehavior`. This test documents a combination of 4 peculiar cases regarding window/rootpane backgrounds. This is packaged as a unit test just so we can identify when a behavior changes. So if it "fails" that really just means "something changed." It doesn't always mean "that change is bad."
In this branch `bug8303950_legacyWindowPaintBehavior` fails, because now the JRootPane's background paints on top of the Window's background.
In the `JDK-8303950-alt-3` branch (see above link) the `bug8303950_legacyWindowPaintBehavior` test passes, which means the behavior doesn't change.
At your convenience please let me know your thoughts. (And obviously I'd love to hear from Alan and anyone else who wants to chime in too.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12993#issuecomment-1478595645
More information about the i18n-dev
mailing list