PDA

View Full Version : Windowing systems and double buffering



tarantula
03-26-2008, 09:29 PM
Hi,

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?

Thanks!

ZbuffeR
03-27-2008, 03:09 AM
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).

tarantula
03-27-2008, 06:11 AM
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 ?)

Thanks.

-NiCo-
03-27-2008, 06:25 AM
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 (http://www.nvidia.com/page/pg_20030622679910.html)



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 (http://www.rendernode.com/articles.php?articleId=237&page=7)



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".

tarantula
03-27-2008, 09:43 AM
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?

PkK
03-30-2008, 05:34 AM
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.

Philipp