drawing_impeller 1002.0.1

Impeller backend for 2D graphics library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::ImpellerSurface;

pub struct VulkanSwapchain {
    pub(crate) vk_swapchain: impellers::VkSwapChain,
}

impl drawing_api::VulkanSwapchain for VulkanSwapchain {
    type Surface = crate::ImpellerSurface;

    fn acquire_next_surface_new(&mut self) -> Result<Self::Surface, &'static str> {
        Ok(ImpellerSurface {
            surface: self
                .vk_swapchain
                .acquire_next_surface_new()
                .ok_or("impeller: cannot acquire next vulkan surface")?,
        })
    }
}