[Wayland] moz_container_wayland_get_surface needs to be thread-safe
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Crash Data
Attachments
(1 file)
moz_container_wayland_get_surface needs to be thread-safe and we should lock/unlock the acquired surface.
Assignee | ||
Comment 1•4 years ago
|
||
Or better we should stop export moz_container_wayland_get_surface() but create an api for particular code like set frame callback etc.
Comment 2•4 years ago
|
||
What's the reason for us needing to wait for a frame callback on the parent to create a surface in the first place?
Splitting get_surface into create and get instead of just making it thread-safe would probably be cleaner than the slightly odd auto-creation thing we have going on right now. If we could get creation done without waiting for a frame, we'd be able to get things on screen a frame faster, and we would probably be able to kill the "initial_draw_cb" thing.
Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Kenny Levinsen :kennylevinsen from comment #2)
What's the reason for us needing to wait for a frame callback on the parent to create a surface in the first place?
Splitting get_surface into create and get instead of just making it thread-safe would probably be cleaner than the slightly odd auto-creation thing we have going on right now. If we could get creation done without waiting for a frame, we'd be able to get things on screen a frame faster, and we would probably be able to kill the "initial_draw_cb" thing.
Because we create a subsurface of the parent surface and we can't create it before the parent is also created.
Comment 4•4 years ago
|
||
It should only exist, though. We shouldn't need to wait a frame - the spec doesn't even seem to require the parent to be configured. I should look into when Gtk actually creates the surface...
It's a bit annoying to have to delay execution of these things, but reducing get to a simple accessor and keeping all the creation logic separate would probably still be nice.
Assignee | ||
Comment 5•4 years ago
|
||
Sure, we can reiterate that again and try to make it work.
Assignee | ||
Comment 6•4 years ago
|
||
-
moz_container_wayland_get_surface() is replaced by moz_container_wayland_surface_lock()/moz_container_wayland_surface_unlock()
pair which ensures the surface is locked and won't be destroyed by other thread when window is hidden for instance. -
nsWindow::GetWaylandSurface() is removed and nsWindow::GetMozContainer() needs to be used instead.
Updated•4 years ago
|
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b17e776c117 [Wayland] Always lock wayland surface when se use it, r=jhorak
Comment 8•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Description
•