|
ginnOS
The reference: libc, the libraries and the kernel
|
Go to the source code of this file.
Data Structures | |
| struct | fb_info_t |
| framebuffer geometry and pixel format, filled by fbinfo(). More... | |
Functions | |
| bool | fb_init (const boot_info_t *boot) |
| initialize the framebuffer from the boot info and map it into the address space. | |
| bool | fb_available (void) |
| whether fb_init() found and mapped a framebuffer. | |
| const fb_info_t * | fb_get_info (void) |
| read-only view of the framebuffer geometry/format. | |
| uint32_t | fb_pack_rgb (uint8_t r, uint8_t g, uint8_t b) |
| compose a pixel value from 8-bit r/g/b according to the framebuffer masks. | |
| void | fb_put_pixel (uint32_t x, uint32_t y, uint32_t pixel) |
| write one pixel. | |
| void | fb_fill_rect (uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t pixel) |
| fill a rectangle with a packed pixel value. | |
| void | fb_clear (uint32_t pixel) |
| clear the whole framebuffer to a packed pixel value. | |
| void | fb_copy_rect (uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y, uint32_t w, uint32_t h) |
| copy a rectangle from one position to another (used for scrolling). | |
| void | fb_flush (void) |
| push all pending drawing to the visible framebuffer. | |
| void | fb_release_graphics (void) |
| give the screen back to the console (FBIO_GRAPHICS): the next fb_flush draws the whole console again. | |
| bool | fb_set_mode (uint32_t width, uint32_t height) |
| change the mode with the display driver (32 bits per pixel). | |
| bool fb_init | ( | const boot_info_t * | boot | ) |
initialize the framebuffer from the boot info and map it into the address space.
must be called after paging_init(), since the framebuffer lives at a high physical address outside the identity-mapped RAM range.
| boot | the boot information from the bootloader. |
| const fb_info_t * fb_get_info | ( | void | ) |
read-only view of the framebuffer geometry/format.
valid after fb_init() returns true.
compose a pixel value from 8-bit r/g/b according to the framebuffer masks.
write one pixel.
out-of-bounds coordinates are ignored.
| x | column, |
| y | row, |
| pixel | packed pixel from fb_pack_rgb(). |
fill a rectangle with a packed pixel value.
clipped to the framebuffer.
| void fb_clear | ( | uint32_t | pixel | ) |
clear the whole framebuffer to a packed pixel value.
| void fb_copy_rect | ( | uint32_t | dst_x, |
| uint32_t | dst_y, | ||
| uint32_t | src_x, | ||
| uint32_t | src_y, | ||
| uint32_t | w, | ||
| uint32_t | h ) |
copy a rectangle from one position to another (used for scrolling).
source and destination may overlap vertically; rows are copied in an order that is safe for an upward move (dst_y < src_y).
| void fb_flush | ( | void | ) |
push all pending drawing to the visible framebuffer.
when a back buffer is in use, drawing ops render into RAM and mark dirty scanlines; this copies the dirty range out to the (slow, uncached) linear framebuffer in one pass. cheap to call after every batch of output. a no-op when running unbuffered.
| void fb_release_graphics | ( | void | ) |
give the screen back to the console (FBIO_GRAPHICS): the next fb_flush draws the whole console again.
a kernel panic calls it.