diff options
author | 2023-03-09 19:05:38 +0100 | |
---|---|---|
committer | 2023-03-09 19:05:38 +0100 | |
commit | caf2836b1b15bff6e8a2ea72441d67f297eb8707 (patch) | |
tree | 0ffa0d1d604780999892b88de85ee93e3ed7d539 /wgpu/src/backend.rs | |
parent | 11b2c3bbe31a43e73a61b9bd9f022233f302ae27 (diff) | |
parent | 424ac8177309440bbd8efe0dd9f7622cb10807ce (diff) | |
download | iced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.tar.gz iced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.tar.bz2 iced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.zip |
Merge pull request #1748 from iced-rs/feature/software-renderer
Software renderer, runtime renderer fallback, and core consolidation
Diffstat (limited to 'wgpu/src/backend.rs')
-rw-r--r-- | wgpu/src/backend.rs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index e650d9a5..88c58554 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -1,11 +1,11 @@ +use crate::core; +use crate::core::{Color, Font, Point, Size}; +use crate::graphics::backend; +use crate::graphics::{Primitive, Transformation, Viewport}; use crate::quad; use crate::text; use crate::triangle; -use crate::{Settings, Transformation}; - -use iced_graphics::backend; -use iced_graphics::layer::Layer; -use iced_graphics::{Color, Font, Primitive, Size, Viewport}; +use crate::{Layer, Settings}; #[cfg(feature = "tracing")] use tracing::info_span; @@ -119,7 +119,7 @@ impl Backend { self.triangle_pipeline.end_frame(); #[cfg(any(feature = "image", feature = "svg"))] - self.image_pipeline.end_frame(device, queue, encoder); + self.image_pipeline.end_frame(); } fn prepare_text( @@ -364,9 +364,9 @@ impl backend::Text for Backend { size: f32, font: Font, bounds: Size, - point: iced_native::Point, + point: Point, nearest_only: bool, - ) -> Option<text::Hit> { + ) -> Option<core::text::Hit> { self.text_pipeline.hit_test( contents, size, @@ -384,17 +384,14 @@ impl backend::Text for Backend { #[cfg(feature = "image")] impl backend::Image for Backend { - fn dimensions(&self, handle: &iced_native::image::Handle) -> Size<u32> { + fn dimensions(&self, handle: &core::image::Handle) -> Size<u32> { self.image_pipeline.dimensions(handle) } } #[cfg(feature = "svg")] impl backend::Svg for Backend { - fn viewport_dimensions( - &self, - handle: &iced_native::svg::Handle, - ) -> Size<u32> { + fn viewport_dimensions(&self, handle: &core::svg::Handle) -> Size<u32> { self.image_pipeline.viewport_dimensions(handle) } } |