Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Digging in the Xorg logs, I've seen that exists a feature called "Page Flipping". The search engines only shows bug reports but not a full description.

So, can you give me a technical description of this feature?. I don't want comments like "is good for the performance" or "is bad for whatever". Just a full description.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Wikipedia has this entry:

Since framebuffers are often designed to handle more than one resolution, they often contain more memory than is necessary to display a single frame at lower resolutions. Since this memory can be considerable in size, a trick was developed to allow for new frames to be written to video memory without disturbing the frame that is currently being displayed.

The concept works by telling the framebuffer to use a specific chunk of its memory to display the current frame. While that memory is being displayed, a completely separate part of memory is filled with data for the next frame. Once the secondary buffer is filled (often referred to as the "back buffer"), the framebuffer is instructed to look at the secondary buffer instead. The primary buffer (often referred to as the "front buffer") becomes the secondary buffer, and the secondary buffer becomes the primary. This switch is usually done during the vertical blanking interval to prevent the screen from "tearing" (i.e., half the old frame is shown, and half the new frame is shown).

Most modern framebuffers are manufactured with enough memory to perform this trick even at high resolutions. As a result, it has become a standard technique used by PC game programmers.

It is also called double buffering, and there is a more extensive explanantion on the OSDev Wiki.

share|improve this answer
    
I know the double buffering, but I didn't know this was also called page flipping. Thanks. –  J.F. Sep 3 '12 at 2:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.