xcb\_dbe\_swap\_buffers(3) XCB Requests xcb\_dbe\_swap\_buffers(3)

# [NAME](#NAME)

xcb\_dbe\_swap\_buffers - Swaps front and back buffers

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;xcb/dbe.h&gt;**

## [Request function](#Request_function)

xcb\_void\_cookie\_t **xcb\_dbe\_swap\_buffers**(xcb\_connection\_t \**conn*, uint32\_t *n\_actions*, const xcb\_dbe\_swap\_info\_t \**actions*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*n\_actions*](#n_actions)

Number of swap actions in *actions*.

[*actions*](#actions)

List of windows on which to swap buffers.

# [DESCRIPTION](#DESCRIPTION)

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.

# [RETURN VALUE](#RETURN_VALUE)

Returns an *xcb\_void\_cookie\_t*. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with *xcb\_request\_check* instead, use *xcb\_dbe\_swap\_buffers\_checked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

This request does never generate any errors.

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3)

# [AUTHOR](#AUTHOR)

Generated from dbe.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

libxcb 1.17.0 X Version 11

---

Document: xcb_dbe_swap_buffers(3) from libxcb 1.17.0-r19 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
