Rename Renderer::present to with_primitives
This commit is contained in:
parent
aca9d414d3
commit
9fe65ed729
5 changed files with 8 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue