mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add put_pixel_unchecked() trait in API
this is for implementing checked, higher-performance loops like blits.
This commit is contained in:
parent
b34f4a4c6f
commit
1db717a63f
1 changed files with 2 additions and 0 deletions
|
|
@ -38,6 +38,8 @@ use crate::platform;
|
|||
pub trait FrameBuffer {
|
||||
/// Puts a pixel of ColorNative at x, y. (0, 0) is defined as the lower left corner.
|
||||
fn put_pixel(&mut self, p: Point, color: ColorNative);
|
||||
/// For higher-performance loops that have guaranteed bounds checking in the point location.
|
||||
unsafe fn put_pixel_unchecked(&mut self, p: Point, on: ColorNative);
|
||||
/// Retrieves a pixel value from the frame buffer; returns None if the point is out of bounds.
|
||||
fn get_pixel(&self, p: Point) -> Option<ColorNative>;
|
||||
/// XORs a pixel to what is in the existing frame buffer. The exact definition of "XOR" is somewhat
|
||||
|
|
|
|||
Loading…
Reference in a new issue