On Tue, 21 Mar 2023 21:07:42 GMT, Jeremy <[email protected]> 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?
>
> Jeremy has updated the pull request incrementally with one additional commit
> since the last revision:
>
> 8303950: adding unit test for legacy window behavior
>
> This test passes in the current JDK. The test criteria don't really reflect
> a rational expected behavior; they just reflect the current status quo.
>
> This currently fails in this JDK-8303950 branch (using the new proposed
> AWTPaintManager), which indicates we've changed behavior.
>
> In this case it's "window 4" that's failing. We used to get a mostly blue
> background, and now we're getting a background that's mostly red with a
> little blue. This isn't necessarily a bad thing; this failure is just
> documenting a change.
src/java.desktop/share/classes/java/awt/Window.java line 3953:
> 3951: if (gg instanceof Graphics2D) {
> 3952: gg.setColor(getBackground());
> 3953: ((Graphics2D)
> gg).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC));
Why was the import for SunHints added if the only edit to this file was adding
a space?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12993#discussion_r1160837035