When I was prototyping composition in the D3D12 branch I was seeing flickering effects on resize until I removed the redirection bitmap. I don’t recall if removing it had any effect when the window was first shown. In any case we need it for D3D9.
Based on some web searches this white flash seems to be a common problem. There’s a delay between when the window is shown and when WM_ERASEBKGND is sent (folks have measured it) and during that delay the window’s client area is white. JavaFX does nothing with WM_ERASEBKGND so the delay is even longer; the white persists until the drawing thread presents pixels. We can shorten the flash period by responding to the first WM_ERASEBKGND message (the fix for JDK-8088179). We don’t want to respond to further calls to WM_ERASEBKGND since that causes flickering during resize (JDK-8171852). Michael, I think you implemented something along these lines in your PR to better sync the windows’ background color with the scene’s fill color. Based on what other folks have experienced it looks like the white flash before the first WM_ERASEBKGND message is almost impossible to get rid of unless you’re using composition. I think the best we can do is respond to the first WM_ERASEBKGND message to shorten the flash period. > On Sep 17, 2026, at 12:23 PM, Michael Strauß <[email protected]> wrote: > > There's another JBS issue that toys with the idea of using DComp > without a redirection bitmap for the D3D12 backend: > https://bugs.openjdk.org/browse/JDK-8377984
