<i18n dev> RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint [v3]
Jeremy
duke at openjdk.org
Tue Mar 21 14:22:41 UTC 2023
> 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: addressing artifacts observed in RepaintManagerFPUIScaleTest
When I resized the window in the RepaintManagerFPUIScaleTest: I saw lots of random patches of misplaced pixels.
I assume this is because the RepaintManager could now call AWTPaintManager#paint(..) recursively, which means each invocation could grab the cached VolatileImage returned by getVolatileOffscreenBuffer. As a test: I tried making getVolatileOffscreenBuffer always return a new image, and that resolved the artifacts.
This change avoids the recursion with a new helper method. This logic is similar to checking JComponent#getFlag(ANCESTOR_USING_BUFFER) , except that can't help identify recursion when the outermost call is coming from a Component like a Window.
To my knowledge this recursion can only ever happen when the outermost call is a non-Swing component and the innermost call is a Swing component. (And there should only ever be one layer of recursion.)
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12993/files
- new: https://git.openjdk.org/jdk/pull/12993/files/6a3a9b42..960fd176
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12993&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12993&range=01-02
Stats: 70 lines in 2 files changed: 35 ins; 10 del; 25 mod
Patch: https://git.openjdk.org/jdk/pull/12993.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/12993/head:pull/12993
PR: https://git.openjdk.org/jdk/pull/12993
More information about the i18n-dev
mailing list