summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-05 15:38:27 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-05 15:38:27 +0700
commit9fe65ed729c75a8401765cf373345aaba93352ca (patch)
tree33a1a87ccf6c8a18b4612f672f63929c34d34de6 /graphics
parentaca9d414d311f901cfe6494a28a48a563f17320b (diff)
downloadiced-9fe65ed729c75a8401765cf373345aaba93352ca.tar.gz
iced-9fe65ed729c75a8401765cf373345aaba93352ca.tar.bz2
iced-9fe65ed729c75a8401765cf373345aaba93352ca.zip
Rename `Renderer::present` to `with_primitives`
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/renderer.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index 30f9d40e..69ed8775 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -31,7 +31,9 @@ impl<B: Backend> Renderer<B> {
self.primitives.push(primitive);
}
- pub fn present(&mut self, f: impl FnOnce(&mut B, &[Primitive])) {
+ /// Runs the given closure with the [`Backend`] and the recorded primitives
+ /// of the [`Renderer`].
+ pub fn with_primitives(&mut self, f: impl FnOnce(&mut B, &[Primitive])) {
f(&mut self.backend, &self.primitives);
}
}