1#[cfg(feature = "vulkan-backend")]
2use ash::vk;
3
4#[derive(Debug, thiserror::Error)]
6pub enum SvgRenderError {
7 #[error("invalid render size {width}x{height}")]
9 InvalidSize { width: u32, height: u32 },
10
11 #[error("invalid pipeline worker count {workers}; expected at least 1")]
13 InvalidWorkerCount { workers: usize },
14
15 #[cfg(feature = "vulkan-backend")]
17 #[error("failed to load Vulkan loader: {0}")]
18 VulkanLoader(#[from] ash::LoadingError),
19
20 #[cfg(feature = "vulkan-backend")]
22 #[error("Vulkan call failed: {0:?}")]
23 Vulkan(#[from] vk::Result),
24
25 #[cfg(feature = "vulkan-backend")]
27 #[error("no Vulkan physical device with graphics queue was found")]
28 NoVulkanDevice,
29
30 #[cfg(feature = "vulkan-backend")]
32 #[error("failed to create Skia Vulkan direct context")]
33 SkiaContext,
34
35 #[error("failed to parse SVG")]
37 SvgParse,
38
39 #[error("failed to create render target")]
41 RenderTarget,
42
43 #[error("failed to read pixels from render target")]
45 ReadPixels,
46
47 #[error("failed to encode PNG")]
49 PngEncode,
50
51 #[error("failed to encode JPEG")]
53 JpegEncode,
54
55 #[error("failed to encode WebP")]
57 WebpEncode,
58
59 #[error("pipeline renderer worker stopped before completing the render job")]
61 PipelineClosed,
62}