[Linux] Use Map/Unmap widget signals to manage GdkWindow
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
Details
Crash Data
Attachments
(3 files)
We need to manage GdkWindow better.
When we get map signal, we need to create GdkWindow and start compositor.
On Unmap widget signals we need to stop compositor and release GdkWindow (or at least underlying EGL window and XWindow) as it's no longer valid.
| Assignee | ||
Comment 1•4 years ago
|
||
This patch does:
- Track nsWindow real visibility by widget_map_cb / widget_unrealize_cb callbacks and set mIsMapped attribute properly.
- Clear mGdkWindow attribute when mGdkWindow is not visible and we can't paint into it.
- Implement and use ConfigureGdkWindow() to set up mGdkWindow when it's visible, start compositor, VSync.
- Implement and use ReleaseGdkWindow() to clear up mGdkWindow when it's not visible, stop compositor, Vsync.
- Make sure nsWindow works when mGdkWindow is null.
- Configure Drag popup accordingly.
| Assignee | ||
Comment 2•4 years ago
|
||
- When GtkCompositorWidget is created, make suspended rendering state as initial one as we can't render to widget window.
Enable rendering when underlying window is visible (nsWindow::ConfigureGdkWindow) or GtkCompositorWidget is assigned (nsWindow::SetCompositorWidgetDelegate). - Use moz_container_wayland_add_initial_draw_callback() at nsWindow::ConfigureGdkWindow() to set Wayland EGL window as it was before.
- Make moz_container_wayland_add_initial_draw_callback() to run callbacks instantly when mozcontainer is already visible.
- Implement and use moz_container_wayland_clear_initial_draw_callback() to clear mozcontainer callbacks when it becomes hidden.
- Rename COMPOSITOR_PAUSED_MISSING_EGL_WINDOW to COMPOSITOR_PAUSED_MISSING_WINDOW as it's used for GLX too.
- Initially pause rendering for GLX too.
| Assignee | ||
Comment 3•4 years ago
|
||
Depends on D127542
| Assignee | ||
Comment 4•4 years ago
|
||
Comment 7•4 years ago
|
||
Backed out for causing multiple test failures with thread sanitizer on GtkCompositorWidget.cpp.
Affected platform is linux1804-64-tsan-qr opt.
Failure log for bc failures
Failure log for wr failures
Failure log for wpt failures
Failure log for mochitest plain failures
Failure log for mda failures
Failure log for reftest failures
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/00569d0fc9b9
https://hg.mozilla.org/mozilla-central/rev/88ecfc06a267
https://hg.mozilla.org/mozilla-central/rev/f632271e9d62
Updated•4 years ago
|
Comment 12•4 years ago
|
||
I think I found a regression caused by this: https://bugzilla.mozilla.org/show_bug.cgi?id=1745098
Comment 13•4 years ago
|
||
This old ifndef is still there. Is this desired?
https://searchfox.org/mozilla-central/rev/5d2b9e940ca09bd1cbc15aa681f69424cde8904c/xpfe/appshell/AppWindow.cpp#586
// XXX: Skip unmapping the window on Linux due to GLX hangs on the compositor
// thread with NVIDIA driver 310.32. We don't need to worry about user
// interactions with destroyed windows on X11 either.
#ifndef MOZ_WIDGET_GTK
if (mWindow) mWindow->Show(false);
#endif
Description
•