maaaath :33
This commit is contained in:
parent
09bdaed3f5
commit
c6290f93fd
4 changed files with 100 additions and 16 deletions
|
|
@ -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),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue