Scrollbar and close button flicker and wobble when window horizontally resizes with WebRender enabled
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
People
(Reporter: cpearce, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(6 files, 1 obsolete file)
(deleted),
video/mp4
|
Details | |
(deleted),
video/mp4
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Reporter | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Reporter | ||
Comment 7•6 years ago
|
||
Reporter | ||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Reporter | ||
Comment 10•6 years ago
|
||
Reporter | ||
Comment 11•6 years ago
|
||
I think my theory previously reported in the standup about the dcomp double or triple buffer containing the frame at the old dimensions is incorrect; when we present in dcomp with a sync interval of 0, we overwrite everything in dcomp's queue and the overwriting frame should be rendered at the next vsync. So when we receive a display list for the new window size, since we only present with a sync interval of 0, the display list for the new window size should render at the next vsync.
The basic compositor can handle resizing without glitching, even in a debug build.
There's lots of good info here about Windows and resize glitches:
https://stackoverflow.com/questions/53000291/how-to-smooth-ugly-jitter-flicker-jumping-when-resizing-windows-especially-drag/53000292#53000292
The basic premise there is that if you don't paint your window within some time limit after receiving a WM_NCCALCSIZE, Windows tries to help by blitting whatever was in the client area before resize to where it thinks it should be in the client area after resize, adding padding to fill the extra space created when enlarging (filled with a background color), or clipping off some of the window when shrinking. It's this interpolated frame rendered with padding/clipping that causes glitches.
Ultimately I think the problem is that when the parent window resizes, if we don't manage to update the compositor's child window in the GPU process before the time limit, Windows will will try to blit the window old contents to the window's new location/size and stuff things up.
I think this is exacerbated by the fact that our child window is in a separate GPU process.
I've patched RenderCompositorANGLE to log the number of vsyncs reported by the dcomp's swap chain stats, and that shows there are multiple vsyncs occurring during the resize in which we don't have a display list for the new window size.
I've tried various things suggested in that stackoverflow post to suppress Windows blitting the window's client area, but not had any success.
I note that Chrome has this bug too.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 12•6 years ago
|
||
The patch disables resizing and rendering of CompositionWnd after 20 times rendering. With it, we could confirm window resizing effect without update of CompositionWnd.
Updated•6 years ago
|
Comment 13•6 years ago
|
||
With attachment 9038414 [details] [diff] [review], during resizing the Firefox window horizontally on its left hand side, I saw the Firefox window's right hand side flicker and wobble. It seemed happen when CompositionWnd's valid region exceeding parent windows' right hand side.
From it, it seems that parent windows clipped CompositionWnd's content, but it seemed not happen sync way with DirectComposition.
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
With attachment 9038421 [details] [diff] [review], I tested to run WebRender with DirectComposition in parent process. With it, during resizing the Firefox window horizontally on its left hand side, I still saw the Firefox window's right hand side flicker and wobble.
Then the problem happened just by enabling DirectComposition without using CompositionWnd.
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
With attachment 9038425 [details] [diff] [review], during resizing the Firefox window horizontally on its left hand side, I still saw the Firefox window's right hand side flicker and wobble even when there was no CompositionWnd and no resizing and rendering. It seemed happen when content exceeding windows' right hand side.
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
With attachment 9038673 [details] [diff] [review], during resizing the Firefox window horizontally on its left hand side, I did not see the Firefox window's right hand side flicker and wobble. But content was shrunk or enlarged horizontally. It seems to happen since DirectComposition was disabled.
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•2 years ago
|
Description
•