Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
blade: Align rasterized path bounds to whole pixels (#16784)
apricotbucket2829745ae22943
diff --git a/crates/gpui/src/platform/blade/blade_renderer.rs b/crates/gpui/src/platform/blade/blade_renderer.rsindex 147966eb387..79e182ff061 100644--- a/crates/gpui/src/platform/blade/blade_renderer.rs+++ b/crates/gpui/src/platform/blade/blade_renderer.rs@@ -481,7 +481,11 @@ impl BladeRenderer {let mut vertices_by_texture_id = HashMap::default();for path in paths {- let clipped_bounds = path.bounds.intersect(&path.content_mask.bounds);+ let clipped_bounds = path+ .bounds+ .intersect(&path.content_mask.bounds)+ .map_origin(|origin| origin.floor())+ .map_size(|size| size.ceil());let tile = self.atlas.allocate_for_rendering(clipped_bounds.size.map(Into::into),AtlasTextureKind::Path,