Struct multicore_bringup::GraphicInfo
source · #[repr(packed(1))]pub struct GraphicInfo { /* private fields */ }
Expand description
A structure to access information about the graphical framebuffer mode that was discovered and chosen in the AP’s real-mode initialization sequence.
Struct format
The layout of fields in this struct must be kept in sync with the code in
ap_realmode.asm
that writes to this structure.
Implementations§
source§impl GraphicInfo
impl GraphicInfo
sourcepub fn physical_address(&self) -> u32
pub fn physical_address(&self) -> u32
Returns the physical address of the primary framebuffer memory.
sourcepub fn total_memory_size_in_bytes(&self) -> u32
pub fn total_memory_size_in_bytes(&self) -> u32
Returns the total size in bytes of the VGA graphics memory.
This memory contains the framebuffer as well as any extra visible displayable memory, which can be used for any graphics purposes, e.g., a backbuffer for double buffering (aka page flipping).
sourcepub fn bytes_per_scanline(&self) -> u16
pub fn bytes_per_scanline(&self) -> u16
The number of bytes in each row or line of the framebuffer’s memory.
This is similar to the “stride” of a framebuffer, but is expressed in units of bytes rather than in units of pixels.
sourcepub fn bits_per_pixel(&self) -> u8
pub fn bits_per_pixel(&self) -> u8
The size of each pixel, in number of bits, not bytes.
sourcepub fn red_position(&self) -> u8
pub fn red_position(&self) -> u8
The position of the least significant bit of a pixel’s Red value.
sourcepub fn green_size(&self) -> u8
pub fn green_size(&self) -> u8
The size of a pixel’s Green value, in number of bits.
sourcepub fn green_position(&self) -> u8
pub fn green_position(&self) -> u8
The position of the least significant bit of a pixel’s Green value.
sourcepub fn blue_position(&self) -> u8
pub fn blue_position(&self) -> u8
The position of the least significant bit of a pixel’s Blue value.
Trait Implementations§
source§impl Clone for GraphicInfo
impl Clone for GraphicInfo
source§fn clone(&self) -> GraphicInfo
fn clone(&self) -> GraphicInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more