140 likes | 278 Views
Virtual framebuffers. Many systems attempt to emulate/follow the function of a framebuffer device, often for reasons of compatibility. The two most common "virtual" framebuffers are Linux framebuffer device (fbdev) X Virtual Framebuffer (Xvfb). Virtual framebuffers….
E N D
Virtual framebuffers • Many systems attempt to emulate/follow the function of a framebuffer device, often for reasons of compatibility. • The two most common "virtual" framebuffers are • Linux framebuffer device (fbdev) • X Virtual Framebuffer (Xvfb).
Virtual framebuffers… • The X Virtual Framebuffer was added to the X Window System distribution to provide a method for running X without a graphical framebuffer. • X Window System distribution is a network-transparent windowing system for bitmap displays.
Virtual framebuffers… • The Linux framebuffer device was developed to for accessing the underlying framebuffer into a guaranteed memory map that is easy for programs to access. • This increases portability, as programs are not required to deal with systems that have disjointed memory maps or require bank switching/paging.
Page flipping • 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.
Page flipping • 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.
Page flipping.. • 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).
Page flipping… • 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.
Graphics accelerators • hardware manufacturers created a way to decrease the amount of CPU time required to fill the framebuffer. • This is commonly called a "graphics accelerator" in the Unix world. • Common graphics drawing commands (many of them geometric) are sent to the graphics accelerator in their raw form.
Graphics accelerators.. • The accelerator then rasterizes the results of the command to the framebuffer. • This method can save from thousands to millions of CPU cycles per command, as the CPU is freed to do other work. • While early accelerators focused on improving the performance of 2D GUI systems, most modern accelerators focus on producing 3D imagery in real time.
Graphics accelerators…. • A common design is to send commands to the graphics accelerator using a library such as OpenGL. • The OpenGL driver then translates those commands to instructions for the accelerator's graphics processing unit (GPU). • The GPU uses those microinstructions to compute the rasterized results. • Those results are bit blitted (bit-block image transfer) to the framebuffer.
Graphics accelerators… • The framebuffer's signal is then produced in combination with built-in video overlay devices (usually used to produce the mouse cursor without modifying the framebuffer's data) and any analog special effects that are produced by modifying the output signal.
Graphics accelerators… • An example of such analog modification was the anti-aliasing technique used by the 3dfx Voodoo cards. • These cards add a slight blur to output signal that makes aliasing of the rasterized graphics much less obvious. • Popular manufacturers of 3D graphics accelerators are NVIDIA and ATI Technologies.
Graphics accelerators… • In digital signal processing, anti-aliasingis the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution signal at a lower resolution • Aliasing: the distortion or artifact that results when the signal reconstructed from samples is different than the original continuous signal.