pub(crate) fn composite_frame(
canvas: &mut [u8],
canvas_width: u32,
canvas_height: u32,
clear_color: Option<[u8; 4]>,
frame: &[u8],
frame_offset_x: u32,
frame_offset_y: u32,
frame_width: u32,
frame_height: u32,
frame_has_alpha: bool,
frame_use_alpha_blending: bool,
previous_frame_width: u32,
previous_frame_height: u32,
previous_frame_offset_x: u32,
previous_frame_offset_y: u32,
)
Expand description
Composites a frame onto a canvas.
Starts by filling the rectangle occupied by the previous frame with the background color, if provided. Then copies or blends the frame onto the canvas.