xcb_dbe_swap_buffers(3)
π xcb_dbe_swap_buffers π
okay so bestie, this one lives in the XCB Requests manual, section 3, and it's the request that swaps your front and back buffers. iconic behaviour, no notes. π
β¨ NAME β¨
xcb_dbe_swap_buffers β swaps front and back buffers. that's it, that's the whole job description π
πΈ SYNOPSIS πΈ
#include <xcb/dbe.h>
π¦ 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 π
connβ the XCB connection to X11. your little phone line to the server, your group chat, your situationship with the display. π«Άn_actionsβ number of swap actions inactions. just a count, bestie. she's counting.actionsβ list of windows on which to swap buffers. the lineup. the roster. the guest list. π
π DESCRIPTION π
So here's the tea. This request swaps the front and back buffers on the specified windows. β¨
And here's the part people always get wrong β the front and back buffers retain their ids. like, they keep their names, they're not reinventing themselves. so:
- the window id continues to refer to the front buffer π
- the back buffer id created by this extension continues to refer to the back buffer π
The back buffer contents is moved to the front buffer. periodt. π
Now β what happens to the back buffer contents after the operation depends on the given swap action. and the optimal swap action depends on how each frame is rendered. π¨
fr fr, here's the 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. yes bestie, sometimes throwing things away IS the self-care. π
And to eliminate visual artifacts, the swap will occur during the monitor VSync, if the X server supports detecting it. that's the conditional, don't come for me. β
π RETURN VALUE π
Returns an xcb_void_cookie_t. errors (if any) have to be handled in the event loop, so likeβ¦ keep an eye on it, okay? π
If you want to handle errors directly with xcb_request_check instead, use xcb_dbe_swap_buffers_checked. See xcb-requests(3) for details. π«Ά
π ERRORS π
This request does never generate any errors. literally none. zero. she's a good girl, she causes no problems, she simply vibes. πβ¨
π SEE ALSO π
π¦ AUTHOR π¦
Generated from dbe.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. π«Ά
and that's the page, bestie!! this little love letter comes to you from X Version 11 and libxcb 1.17.0 β go forth and swap those buffers, you absolute main character ππβ¨
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms