When we discussed what the GPU is we mentioned that it manipulates images in the frame buffer.
The frame buffer, also known as a framebuffer or framestore, is a section of the computer's RAM that contains the current video frame to be displayed on the monitor or similar device.
Within Linux, we also have what is known as the Linux framebuffer, which is a software abstraction designed to show graphics on screen via a hardware-independent method.
This can be accessed as a file and its API library can be imported into C programs via the header linux/fb.h
.
When we open the frame buffer as a file we can then make input/output control (ioctl) calls to it. An ioctl
system call is used to manipulate device-specific I/O operations. You will see ioctl
calls implemented when interacting with a variety of hardware devices, including DVD drives, USB devices, and similar.
We can use a call to the frame buffer to get the current display settings, for example. Let's take a look at...