Closed Bug 1754711 Opened 2 years ago Closed 2 years ago

Recreate CompositorWidgetInitData when widget is hidden/shown

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1777664

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(1 obsolete file)

We need to re-create CompositorWidgetInitData when widget is hidden/shown.

A compositor can be created before we get a gtk widget map event. That leads to wrong XWindow reference passed to GtkCmmpositorWidget.
In this patch we destroy compositor on gtk map event (if there's any) to make sure it's recreated with correct XWindow reference.

Summary: Re-create CompositorWidgetInitData when widget is hidden/shown → Recreate CompositorWidgetInitData when widget is hidden/shown

The error is: Failed to connect WebRenderBridgeChild

It looks like the CleanLayerManagerRecursive() I use to force re-create compositor is not enough. Looks like there's CompositorBridgeParent left with incorrect mRootLayerTreeID and when another compositor is created, BrowserChild::InitRenderingState() is called with that old mRootLayerTreeID which leads to 'NO_PARENT' error and fallback compositor is created.

That also implies that nsWindow::SetTransparencyMode() may produce the same error:
https://searchfox.org/mozilla-central/rev/81c52abeec336685330af5956c37b4bcf8926476/widget/gtk/nsWindow.cpp#6384

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:stransky, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(stransky)
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Flags: needinfo?(stransky)

We can't do that - resume is enough here and that's in Bug 1777664.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Attachment #9263250 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: