App: fix the on_main_frame_committed doc, the hook orders a swap, it does not make it atomic
The comment promised that a subsurface mounted or retired from the hook lands in the same flush as the main frame. It does not: the main buffer goes out with its swap, which flushes the connection at once, and the subsurfaces are reconciled afterwards. What the hook guarantees is ordering, the main frame is already sent when it fires, which is enough to retire a subsurface safely but not to mount one without a gap.
This commit is contained in:
+3
-2
@@ -563,8 +563,9 @@ pub trait App: 'static
|
|||||||
|
|
||||||
/// Called every time a buffer for the main surface has been rendered and
|
/// Called every time a buffer for the main surface has been rendered and
|
||||||
/// committed, before the subsurfaces are reconciled for the same
|
/// committed, before the subsurfaces are reconciled for the same
|
||||||
/// iteration. Lets a host retire or mount a subsurface in the same flush
|
/// iteration. Lets a host sequence a subsurface change after the main
|
||||||
/// as the main frame it replaces, so the swap lands in one frame.
|
/// frame it depends on: a subsurface retired here goes away only once
|
||||||
|
/// the main frame that replaces it has been sent.
|
||||||
fn on_main_frame_committed( &mut self ) {}
|
fn on_main_frame_committed( &mut self ) {}
|
||||||
|
|
||||||
/// Called when the surface is asked to close (compositor request, titlebar button,
|
/// Called when the surface is asked to close (compositor request, titlebar button,
|
||||||
|
|||||||
Reference in New Issue
Block a user