egui/epaint/src
Emil Ernerfeldt 7b18fab7a4
Optimize tessellation of filled circles (#1616)
When painting a scatter plot we sometimes want to paint hundreds of thousands of points (filled circles) on screen every frame.

In this PR the font texture atlas is pre-populated with some filled circled of various radii. These are then used when painting (small) filled circled, which means A LOT less triangles and vertices are generated for them.

In a new benchmark we can see a 10x speedup in circle tessellation, but the the real benefit comes in the painting of these circles: since we generate a lot less vertices, the backend painter has less to do.

In a real-life scenario with a lot of things being painted (including around 100k points) I saw tessellation go from 35ms -> 7ms and painting go from 45ms -> 1ms. This means the total frame time went from 80ms to 8ms, or a 10x speedup.
2022-05-10 19:31:19 +02:00
..
text Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
util OrderedFloat refactor (#918) 2021-12-11 13:52:23 +01:00
bezier.rs Add more doc-links in docstrings (#1419) 2022-04-03 18:18:35 +02:00
color.rs Added CursorIcons for resizing columns, rows and 8 cardinal directions 2022-04-19 16:56:27 +02:00
image.rs Misc doc improvements 2022-04-13 22:14:34 +02:00
lib.rs Improve text contrast in bright mode (#1412) 2022-03-23 16:49:49 +01:00
mesh.rs Add Image::rotate and Mesh::rotate (#1371) 2022-03-22 08:44:23 +01:00
mutex.rs Remove epaint::mutex::Arc type alias 2022-04-15 15:18:21 +02:00
shadow.rs Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
shape.rs Fix CircleShape::visual_bounding_rect() (#1575) 2022-05-05 09:16:00 +02:00
shape_transform.rs Add Shape::Callback to do custom rendering inside of an egui UI (#1351) 2022-03-14 13:25:11 +01:00
stats.rs Improve the introspection paint stats 2022-03-20 23:05:16 +01:00
stroke.rs Add separate serialize feature and better persitence control (#753) 2021-09-29 08:45:13 +02:00
tessellator.rs Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
texture_atlas.rs Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
texture_handle.rs Remove epaint::mutex::Arc type alias 2022-04-15 15:18:21 +02:00
textures.rs Introduce egui::FullOutput, returned from Context::run (#1292) 2022-02-22 17:13:53 +01:00