summaryrefslogtreecommitdiffstats
path: root/core/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-03 21:07:54 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-03 21:07:54 +0200
commitb05e61f5c8ae61c9f3c7cc08cded53901ebbccfd (patch)
tree3d35a011d94d4936f09b5a9be4031358a09c60da /core/src/renderer.rs
parent99a904112ca111f2ab0e60e30b6c369741b1653b (diff)
downloadiced-b05e61f5c8ae61c9f3c7cc08cded53901ebbccfd.tar.gz
iced-b05e61f5c8ae61c9f3c7cc08cded53901ebbccfd.tar.bz2
iced-b05e61f5c8ae61c9f3c7cc08cded53901ebbccfd.zip
Redesign `iced_wgpu` layering architecture
Diffstat (limited to 'core/src/renderer.rs')
-rw-r--r--core/src/renderer.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/renderer.rs b/core/src/renderer.rs
index 6712314e..f5ef8f68 100644
--- a/core/src/renderer.rs
+++ b/core/src/renderer.rs
@@ -9,7 +9,7 @@ use crate::{
/// A component that can be used by widgets to draw themselves on a screen.
pub trait Renderer {
/// Starts recording a new layer.
- fn start_layer(&mut self);
+ fn start_layer(&mut self, bounds: Rectangle);
/// Ends recording a new layer.
///
@@ -20,13 +20,13 @@ pub trait Renderer {
///
/// The layer will clip its contents to the provided `bounds`.
fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self)) {
- self.start_layer();
+ self.start_layer(bounds);
f(self);
self.end_layer(bounds);
}
/// Starts recording with a new [`Transformation`].
- fn start_transformation(&mut self);
+ fn start_transformation(&mut self, transformation: Transformation);
/// Ends recording a new layer.
///
@@ -39,7 +39,7 @@ pub trait Renderer {
transformation: Transformation,
f: impl FnOnce(&mut Self),
) {
- self.start_transformation();
+ self.start_transformation(transformation);
f(self);
self.end_transformation(transformation);
}