O que é o “Page Flipping” no Xorg?

3

Procurando nos logs do Xorg, eu vi que existe um recurso chamado "Page Flipping". Os mecanismos de pesquisa só mostram relatórios de bugs, mas não uma descrição completa.

Então, você pode me dar uma descrição técnica desse recurso ?. Eu não quero comentários como "é bom para o desempenho" ou "é ruim para qualquer coisa". Apenas uma descrição completa.

    
por Rufo El Magufo 03.09.2012 / 02:12

1 resposta

3

A Wikipedia tem esta entrada :

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.

Também é chamado de buffer duplo, e há uma explicação mais extensa sobre o Wiki OSDev .

    
por 03.09.2012 / 03:23

Tags