Scrolling BMO page(bug 1946657) caused black flickering in whole UI with layer compositor enabled
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: sotaro, Assigned: sotaro)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
6.88 KB,
patch
|
Details | Diff | Splinter Review | |
194.18 KB,
image/png
|
Details |
With layer compositor enabled, black flickering appeared during scrolling bug 1946657.
The bug seems similar to Bug 1946651 and Bug 1948882.
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Comment 1•23 days ago
|
||
When the flickering happened, DCSwapChain was re-created.
Assignee | ||
Comment 2•21 days ago
|
||
Looked into more.
The workaround of Bug 1946657 did not work for this bug.
During the problem happening, DCSwapChain was re-created and 2 same size frame buffer surfaces was used. One surface was opaque with NativeSurfaceId == 0. Other surface was non opaque with NativeSurfaceId != 0. Using 2 frame buffer surfaces seemed to trigger the problem.
At first, it is better to use only one frame buffer surface like chromium.
Assignee | ||
Comment 3•21 days ago
|
||
Assignee | ||
Comment 4•21 days ago
•
|
||
chromium supports video overlay and underlay with one frame buffer surface.
To support underlay, frame buffer surface becomes non opaque when video overlay exists.
In UpdateRenderPassFromOverlayData(), "render_pass->has_transparent_background" is set to true. It triggers to set non-opaque. When the surface becomes non-opaque, it continues at least for kNumberOfFramesBeforeDisablingDCLayers(60) frames.
Further, when video overlay is enabled, it tries to use DComp surface instead of swap chain. In UpdateRenderPassFromOverlayData(), "render_pass->needs_synchronous_dcomp_commit" to true. The needs_synchronous_dcomp_commit is set to "requirements.scanout_dcomp_surface" in DirectRenderer::CalculateRenderPassRequirements(). Then "scanout_dcomp_surface" is changed to SHARED_IMAGE_USAGE_SCANOUT_DCOMP_SURFACE in SkiaRenderer::AllocateRenderPassResourceIfNeeded(). But DComp surfaces do not support RGB10A2. Then in this case, DComp surface could not be used.
Actual frame buffer surface allocation is triggered in SkiaRenderer::AllocateRenderPassResourceIfNeeded(). Then the allocation finally end up to DCompImageBackingFactory::CreateSharedImage().
When SHARED_IMAGE_USAGE_SCANOUT_DCOMP_SURFACE is set, DCompSurfaceImageBacking is created. Otherwise, DXGISwapChainImageBacking. is created.
Assignee | ||
Comment 5•21 days ago
|
||
chromium uses overlay when there is no occluders in DCLayerOverlayProcessor::PromoteCandidates().
Underlay is used when there is occluder and underlay is allowed in DCLayerOverlayProcessor::PromoteCandidates().
Assignee | ||
Comment 6•21 days ago
|
||
chromium's DComp overlay seems to support rounded corners. It is handled in DCLayerTree::VisualTree::VisualSubtree::Update().
Assignee | ||
Comment 7•21 days ago
|
||
Chromium seems to have a wip bug to split ui and WebContent to different SwapChain.
Assignee | ||
Comment 8•21 days ago
•
|
||
If multiple swap chains are used, display timing could be asynchronous between swap chains. It would then seem not good to split into multiple swap chains within content that needs to be synchronized.
If we want to split within content that needs to be synchronized, we need to use DComp Surface instead of swap chain.
Comment 9•17 days ago
|
||
This may be fixed when 1951548 lands.
Assignee | ||
Comment 10•16 days ago
•
|
||
(In reply to Glenn Watson [:gw] from comment #9)
This may be fixed when 1951548 lands.
I applied the patch locally, and the problem was not addressed for me. The flickering happened differently. I am going to check again with latest m-c.
Assignee | ||
Comment 11•16 days ago
|
||
The problem also happened with bug 1951548 fix with latest m-c.
Assignee | ||
Comment 12•16 days ago
|
||
With bug 1951548 fix with latest m-c, while rectangle appeared in addition to flickering.
Comment 13•9 days ago
|
||
The severity field is not set for this bug.
:gw, could you have a look please?
For more information, please visit BugBot documentation.
Updated•8 days ago
|
Assignee | ||
Comment 14•4 days ago
|
||
Assignee | ||
Comment 15•4 days ago
|
||
With D241772, I still see the flickering. It might be caused by other reasons.
Updated•3 days ago
|
Description
•