Closed Bug 1998657 Opened 6 months ago Closed 5 months ago

[Wayland] Allow to paint to offscreen surface before map

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(6 files)

[Wayland] Allow to paint to offscreen surface before map.

It means to remove moz_container_wayland_is_waiting_to_show() and WaylandSurface::mIsReadyToDraw which should be always true.

Assignee: nobody → stransky
Status: NEW → ASSIGNED

Let's land it in next cycle, after freeze.

Pushed by stransky@redhat.com: https://github.com/mozilla-firefox/firefox/commit/b39b0ef973df https://hg.mozilla.org/integration/autoland/rev/e423b6493306 [Wayland] Make WaylandSurface ready to draw right after its created r=emilio https://github.com/mozilla-firefox/firefox/commit/de6ac364421c https://hg.mozilla.org/integration/autoland/rev/3d23ba5d4bf6 [Wayland] Create EGLWindow over offscreen wl_surface and make it always available r=emilio
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f5f68709dddc https://hg.mozilla.org/integration/autoland/rev/094757ccd72d Revert "Bug 1998657 [Wayland] Create EGLWindow over offscreen wl_surface and make it always available r=emilio" for causing valgrind failures
Flags: needinfo?(stransky)

Thanks, will look at it.

Flags: needinfo?(stransky)

applied those patches over autoland and bookmarks menus (second level - wheh hoovering over folder ) disappeared again.

Pushed by stransky@redhat.com: https://github.com/mozilla-firefox/firefox/commit/c2d08fd134f4 https://hg.mozilla.org/integration/autoland/rev/f38b48f473af [Wayland] Make WaylandSurface ready to draw right after its created r=emilio https://github.com/mozilla-firefox/firefox/commit/114cfcb1e4d0 https://hg.mozilla.org/integration/autoland/rev/4b375c234df0 [Wayland] Create EGLWindow over offscreen wl_surface and make it always available r=emilio https://github.com/mozilla-firefox/firefox/commit/e71ec995b1bb https://hg.mozilla.org/integration/autoland/rev/140faab7b8ed [Linux] Update gdk_x11 window resource leak as GdkWindow is created from nsWindow::Create() r=emilio

(In reply to s.zharkoff from comment #12)

applied those patches over autoland and bookmarks menus (second level - wheh hoovering over folder ) disappeared again.

Will look at it, Thanks.

Flags: needinfo?(stransky)
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Regressions: 2000409
Regressions: 2000425
Regressions: 2000419
Regressions: 2000421
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/89b2affdc5d2 https://hg.mozilla.org/integration/autoland/rev/338a6e3364af Revert "Bug 1998657 [Linux] Update gdk_x11 window resource leak as GdkWindow is created from nsWindow::Create() r=emilio" for causing various crashes
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 147 Branch → ---

Thanks. The regressions here are caused by removed ready-to-draw callback. It was replaced by regular callback & mIsVisible but we don't actually register VSync handlers / frame callbacks for popups so we're missing the state then for popups.

Flags: needinfo?(stransky)

I hit another possible regression / crash when toplevel window is detached to a new one by D&D. Investigating now.

Looks like we need to set / remove mGdkWindow by moz_container_realize / moz_container_unrealize where it's created/deleted.

There's one missing piece here - As mGdkWindow can be null (between unrealize/realize call) we may partially revert !mGdkWindow conditions from https://phabricator.services.mozilla.com/D271773 and investigate wl_surface usage derived from mGdkWindow/mContainer. AFAIK this change may affects D&D popups and titlebar on/off switch from customize.

D&D popup uses SW drawing to cairo surface derived from GtkWidget so we should be safe here. Titlebar on/off code preserves mContainer and realize/unrealize mShell only:
https://searchfox.org/firefox-main/rev/3728e0c87fc4fa87ddf0c7a8183f2dd2329be96a/widget/gtk/nsWindow.cpp#9149

But we should investigate these cases and put appropriate asserts there.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://github.com/mozilla-firefox/firefox/commit/915de2a8936a https://hg.mozilla.org/integration/autoland/rev/13531e6d7800 [Wayland] Make WaylandSurface ready to draw right after its created r=emilio https://github.com/mozilla-firefox/firefox/commit/6cb5ce2f04df https://hg.mozilla.org/integration/autoland/rev/8d2c2eed0ae9 [Wayland] Create EGLWindow over offscreen wl_surface and make it always available r=emilio https://github.com/mozilla-firefox/firefox/commit/51937e8e4515 https://hg.mozilla.org/integration/autoland/rev/ab4b6522b172 [Linux] Update gdk_x11 window resource leak as GdkWindow is created from nsWindow::Create() r=emilio https://github.com/mozilla-firefox/firefox/commit/1997d8a78dcd https://hg.mozilla.org/integration/autoland/rev/894dbdde0d67 [Wayland] Update fractional scale & popup logging r=emilio https://github.com/mozilla-firefox/firefox/commit/7cf41c4eb161 https://hg.mozilla.org/integration/autoland/rev/12fb9984f683 [Wayland] Set mIsVisible from frame callback r=emilio https://github.com/mozilla-firefox/firefox/commit/3a006d1c8f2a https://hg.mozilla.org/integration/autoland/rev/1ca35d1f2d48 [Linux] Set/Unset mGdkWindow on container realize/unrealize to make sure we have recent GdkWindow r=jhorak
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b73e692a64e8 https://hg.mozilla.org/integration/autoland/rev/5068fbe918fa Revert "Bug 1998657 [Linux] Set/Unset mGdkWindow on container realize/unrealize to make sure we have recent GdkWindow r=jhorak" for causing bustages at WaylandSurface.cpp.

Updated, Thanks.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://github.com/mozilla-firefox/firefox/commit/a0d567ff3daa https://hg.mozilla.org/integration/autoland/rev/56d739c47a29 [Wayland] Make WaylandSurface ready to draw right after its created r=emilio https://github.com/mozilla-firefox/firefox/commit/65ab92784908 https://hg.mozilla.org/integration/autoland/rev/34254848c695 [Wayland] Create EGLWindow over offscreen wl_surface and make it always available r=emilio https://github.com/mozilla-firefox/firefox/commit/e03e557a6033 https://hg.mozilla.org/integration/autoland/rev/b6c8a8b3ccc3 [Linux] Update gdk_x11 window resource leak as GdkWindow is created from nsWindow::Create() r=emilio https://github.com/mozilla-firefox/firefox/commit/0de0fe7b26f4 https://hg.mozilla.org/integration/autoland/rev/1a8f93c5ffe1 [Wayland] Update fractional scale & popup logging r=emilio https://github.com/mozilla-firefox/firefox/commit/a383a1fc3258 https://hg.mozilla.org/integration/autoland/rev/d5eec9e18b63 [Wayland] Set mIsVisible from frame callback r=emilio https://github.com/mozilla-firefox/firefox/commit/d8886e6742df https://hg.mozilla.org/integration/autoland/rev/1507c17888dc [Linux] Set/Unset mGdkWindow on container realize/unrealize to make sure we have recent GdkWindow r=jhorak
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: