SoftwareRenderer: add API to construct and change the buffer type

This commit is contained in:
Olivier Goffart 2023-07-27 13:13:01 +02:00 committed by Olivier Goffart
parent 116648ffcf
commit 49485dbf7d
5 changed files with 26 additions and 46 deletions

View file

@ -256,7 +256,7 @@ pub unsafe extern "C" fn slint_software_renderer_new(buffer_age: u32) -> Softwar
2 => RepaintBufferType::SwappedBuffers,
_ => unreachable!(),
};
Box::into_raw(Box::new(SoftwareRenderer::new_without_window(repaint_buffer_type)))
Box::into_raw(Box::new(SoftwareRenderer::new_with_repaint_buffer_type(repaint_buffer_type)))
as SoftwareRendererOpaque
}