maaaath :33

This commit is contained in:
CDaut 2025-10-01 14:40:15 +02:00
parent 09bdaed3f5
commit c6290f93fd
Signed by: clara
GPG key ID: 223391B52FAD4463
4 changed files with 100 additions and 16 deletions

View file

@ -6,8 +6,8 @@ use alloc::vec::Vec;
use uefi::Error;
pub struct Buffer {
width: usize,
height: usize,
pub width: usize,
pub height: usize,
pixels: Vec<BltPixel>,
}
@ -37,11 +37,7 @@ impl Buffer {
}
/// Update only a pixel to the framebuffer.
fn blit_pixel(
&self,
gop: &mut GraphicsOutput,
coords: (usize, usize),
) -> Result<(), Error> {
fn blit_pixel(&self, gop: &mut GraphicsOutput, coords: (usize, usize)) -> Result<(), Error> {
gop.blt(BltOp::BufferToVideo {
buffer: &self.pixels,
src: BltRegion::SubRectangle {
@ -52,4 +48,4 @@ impl Buffer {
dims: (1, 1),
})
}
}
}