-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
view backend: Properly unregister surfaces
When a new surface is registered for an existing ViewBackend, unregister the old one first, to avoid keeping stale registrations. This makes the WS::Instance::m_viewBackendMap only contain one entry pointing for any given ViewBackend instance, instead of growing continuosly. To ensure that the same code path is taken when the wl_client for a ViewBackend is destroyed, all the operations to be done are moved into ViewBackend::clientDestroyNotify(), the callback of the wl_client destruction listener, then ViewBackend::unregisterSurface() only needs to call wl_client_destroy(). This way the ~ViewBackend destructor only needs to call unregisterSurface() as well. Also, avoid doing any operation in ViewBackend::dispatchFrameCallbacks() and ViewBackend::releaseBuffer() if the client connection has been lost.
- Loading branch information
Showing
2 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters