Compositing stalls waiting for remote textures from canvases that were destroyed or lost their context
Categories
(Core :: Graphics, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Attachments
(3 external files)
RemoteTextureMap keeps waiting for remote texture owners that will never provide the texture being waited on.
-
It cannot tell an owner that has not been registered yet from one that was already unregistered. A texture that reaches the compositor after its owner went away (for example, a canvas destroyed right after presenting a frame) is waited on as if the owner were about to appear.
WaitForRemoteTextureOwnerandWaitRemoteTextureReadythen block the compositor thread for the full owner timeout (10 seconds). The compositor thread is shared, so compositing stalls for every window, not just the one with the canvas. -
Pending ready checks for an owner whose context was lost, or whose unregistration was deferred until its last transaction, are not woken. They wait until the owner is finally unregistered or the check times out, even though no more textures are coming. The image host stays stuck on its pending textures meanwhile.
Proposed fix:
- Remember whether each owner named by a live
RemoteTextureHostWrapperwas registered (bounded by the wrappers), and do not wait for textures nothing can use any more. - Wake pending ready checks when an owner loses its context or defers its unregistration.
- Add
RemoteTextureMapgtests for these cases.
Bug 1888931 is the same stall after a GPU process restart, where the new RemoteTextureMap has never seen the old owner. That case is not covered here.
| Assignee | ||
Comment 1•4 days ago
|
||
RemoteTextureMap could not tell an owner that had not been registered yet
from one that had already been unregistered, so a texture arriving after
its owner went away waited for the full timeout on the compositor thread.
Remember whether each owner named by a live RemoteTextureHostWrapper was
registered, which bounds the state by the wrappers, and don't wait for
textures that no wrapper can use any more.
| Assignee | ||
Comment 2•4 days ago
|
||
Ready checks waiting for a texture from an owner whose context was lost,
or whose unregistration was deferred until its last transaction, were
left waiting until the owner was unregistered or the check timed out,
even though no more textures were coming.
| Assignee | ||
Comment 3•4 days ago
|
||
Backed out for causing build bustages @ TestRemoteTextureMap.cpp
| Assignee | ||
Comment 7•4 days ago
|
||
green try: https://treeherder.mozilla.org/jobs?repo=try&revision=9bbb50ab75a0a34198c658f8aacf2e6966334a95
Comment 9•4 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/94762f2e800e
https://hg.mozilla.org/mozilla-central/rev/88f9895fb075
https://hg.mozilla.org/mozilla-central/rev/4211a1ce1da2
Description
•