Commit edb8c538 authored by robbycerantola's avatar robbycerantola

image_line fast one line render

parent 0011a3fa
......@@ -329,6 +329,16 @@ pub trait Renderer {
fn image_line (&mut self, start_x: i32, start_y: i32, width: u32, image_data: &[Color]) {
let start = start_y as usize * self.width() as usize + start_x as usize;
let window_data = self.data_mut();
let stop = start + width as usize;
let end = width as usize;
// Speed improved, but image has to be all inside of window boundary
fn image_fast (&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color]) {
let window_w = self.width() as usize;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment