Function x11rb::protocol::dbe::swap_buffers

source ·
pub fn swap_buffers<'c, 'input, Conn>(
    conn: &'c Conn,
    actions: &'input [SwapInfo]
) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where Conn: RequestConnection + ?Sized,
Expand description

Swaps front and back buffers.

Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the “untouched” action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it.

§Fields

  • n_actions - Number of swap actions in actions.
  • actions - List of windows on which to swap buffers.