diff options
author | 2023-09-10 01:14:39 +0200 | |
---|---|---|
committer | 2023-09-10 01:14:39 +0200 | |
commit | 1af5ff41abdef243588199ef7988666655924a02 (patch) | |
tree | 4dfd518dd93b0393e77355867062c60d75e7f358 /core/src/renderer.rs | |
parent | a3489e4af960388e9f73988b88df361022a654a4 (diff) | |
parent | 1cc5bf59d7c4f47ae47d9a4e22ebaab3ea4975c1 (diff) | |
download | iced-1af5ff41abdef243588199ef7988666655924a02.tar.gz iced-1af5ff41abdef243588199ef7988666655924a02.tar.bz2 iced-1af5ff41abdef243588199ef7988666655924a02.zip |
Merge pull request #2058 from iced-rs/explicit-text-caching
Explicit text caching
Diffstat (limited to 'core/src/renderer.rs')
-rw-r--r-- | core/src/renderer.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/core/src/renderer.rs b/core/src/renderer.rs index 7c73d2e4..1b327e56 100644 --- a/core/src/renderer.rs +++ b/core/src/renderer.rs @@ -5,26 +5,13 @@ mod null; #[cfg(debug_assertions)] pub use null::Null; -use crate::layout; -use crate::{Background, BorderRadius, Color, Element, Rectangle, Vector}; +use crate::{Background, BorderRadius, Color, Rectangle, Vector}; /// A component that can be used by widgets to draw themselves on a screen. pub trait Renderer: Sized { /// The supported theme of the [`Renderer`]. type Theme; - /// Lays out the elements of a user interface. - /// - /// You should override this if you need to perform any operations before or - /// after layouting. For instance, trimming the measurements cache. - fn layout<Message>( - &mut self, - element: &Element<'_, Message, Self>, - limits: &layout::Limits, - ) -> layout::Node { - element.as_widget().layout(self, limits) - } - /// Draws the primitives recorded in the given closure in a new layer. /// /// The layer will clip its contents to the provided `bounds`. |