Implement basic presentation with softbuffer for iced_tiny_skia
This commit is contained in:
parent
8c373cd497
commit
535d7a4d57
6 changed files with 90 additions and 30 deletions
|
|
@ -201,11 +201,15 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
|
|||
fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>(
|
||||
&mut self,
|
||||
window: &W,
|
||||
width: u32,
|
||||
height: u32,
|
||||
) -> wgpu::Surface {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe {
|
||||
self.instance.create_surface(window)
|
||||
}
|
||||
let mut surface = unsafe { self.instance.create_surface(window) };
|
||||
|
||||
self.configure_surface(&mut surface, width, height);
|
||||
|
||||
surface
|
||||
}
|
||||
|
||||
fn configure_surface(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue