Windowing systems and double buffering


I would like to know how windowing systems handle multiple applications and double buffering. Each application can swap its back and front buffers at different times. How can this be done efficiently when the screen is a large are with multiple windows in it?


depends on how the drivers implements it, either each back buffer is separate (easy to do, but consumes more memory) or an unified back buffer is used (still doable to copy each rectangle separately to the front buffer).

If a unified back buffer is used, then I guess the implementation some how blits the dirty rects just behind pixels that are being read and sent to the display. Is there some hardware support for this? How can I learn more about these things? (Maybe some specific documentation of X11 ?)


Don’t know where to find the documentation you’re looking for but I do know that Nvidia Quadro GPUs have Hardware 3D Window Clipping

Hardware 3D Window Clipping
Hardware accelerated clip regions (data transfer mechanism between a window and the frame buffer) which improve overall graphics performance by increasing transfer speed between color buffer and frame buffer.

Clip regions

Clip regions
During a typical workflow, workstation applications pop up many windows for menus or alternative views of components or scenes. Unlike consumer applications such as games, these applications often occupy the full screen, so the result is many overlapping windows. Depending on how they are handled by the graphics hardware, overlapping windows may noticeably affect visual quality and graphics performance. NVIDIA’s Quadro GPU architecture manages the transfer of data between a window and the overall frame buffer by clip regions. When a window has no overlapping windows, the entire contents of the color buffer can be transferred to the frame buffer in a single, continuous rectangular region. However, if other windows overlap the window, the transfer of data from the color buffer to the frame buffer must be broken into a series of smaller, discontinuous rectangular regions. These rectangular regions are referred to as “clip regions”.

Hmm I was expecting this would be more common functionality. So I guess most regular (non-3d) applications don’t use double buffering at all?

Double buffering is in near universal use.
Both GTK+ and Qt use double buffering for their widgets.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.