summaryrefslogtreecommitdiffstats
path: root/renderer
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-09 22:25:16 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-09 22:25:16 +0200
commit6ad5bb3597f640ac329801adf735d633bf0a512f (patch)
treef0928edacd09d6537878d22b00ad7ed7829c9ac0 /renderer
parent2c6fd9ac14c5d270e05b97b7a7fab811d25834c4 (diff)
downloadiced-6ad5bb3597f640ac329801adf735d633bf0a512f.tar.gz
iced-6ad5bb3597f640ac329801adf735d633bf0a512f.tar.bz2
iced-6ad5bb3597f640ac329801adf735d633bf0a512f.zip
Port `iced_tiny_skia` to new layering architecture
Diffstat (limited to 'renderer')
-rw-r--r--renderer/src/fallback.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/renderer/src/fallback.rs b/renderer/src/fallback.rs
index 975f4866..c932de00 100644
--- a/renderer/src/fallback.rs
+++ b/renderer/src/fallback.rs
@@ -9,6 +9,8 @@ use crate::graphics;
use crate::graphics::compositor;
use crate::graphics::mesh;
+use std::borrow::Cow;
+
/// A renderer `A` with a fallback strategy `B`.
///
/// This type can be used to easily compose existing renderers and
@@ -51,8 +53,8 @@ where
delegate!(self, renderer, renderer.start_layer(bounds));
}
- fn end_layer(&mut self, bounds: Rectangle) {
- delegate!(self, renderer, renderer.end_layer(bounds));
+ fn end_layer(&mut self) {
+ delegate!(self, renderer, renderer.end_layer());
}
fn start_transformation(&mut self, transformation: Transformation) {
@@ -63,8 +65,8 @@ where
);
}
- fn end_transformation(&mut self, transformation: Transformation) {
- delegate!(self, renderer, renderer.end_transformation(transformation));
+ fn end_transformation(&mut self) {
+ delegate!(self, renderer, renderer.end_transformation());
}
}
@@ -93,10 +95,6 @@ where
delegate!(self, renderer, renderer.default_size())
}
- fn load_font(&mut self, font: std::borrow::Cow<'static, [u8]>) {
- delegate!(self, renderer, renderer.load_font(font));
- }
-
fn fill_paragraph(
&mut self,
text: &Self::Paragraph,
@@ -323,6 +321,10 @@ where
}
}
+ fn load_font(&mut self, font: Cow<'static, [u8]>) {
+ delegate!(self, compositor, compositor.load_font(font));
+ }
+
fn fetch_information(&self) -> compositor::Information {
delegate!(self, compositor, compositor.fetch_information())
}