1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Speed up fractal_clock painting (#152)

clip unwatchable line before drawing
This commit is contained in:
xue-blood
2021-02-06 23:59:46 +08:00
committed by GitHub
parent 26f966563a
commit ce14fa860b
3 changed files with 21 additions and 2 deletions

View File

@@ -116,6 +116,9 @@ impl Painter {
.add(self.clip_rect, shape)
}
/// Add many shapes at once.
///
/// Calling this once is generally faster than calling [`Self::add`] multiple times.
pub fn extend(&self, shapes: Vec<Shape>) {
if !shapes.is_empty() {
self.ctx