From 073ff96a9fafe77249bc759931eab9e71138b711 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 31 Mar 2021 13:27:51 +0200 Subject: [PATCH] Snap quads to pixel grid to avoid antialiasing them around the edges --- gpui/src/platform/mac/renderer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpui/src/platform/mac/renderer.rs b/gpui/src/platform/mac/renderer.rs index b52277e959..61680dfb90 100644 --- a/gpui/src/platform/mac/renderer.rs +++ b/gpui/src/platform/mac/renderer.rs @@ -434,8 +434,8 @@ impl Renderer { let bounds = quad.bounds * scene.scale_factor(); let border_width = quad.border.width * scene.scale_factor(); let shader_quad = shaders::GPUIQuad { - origin: bounds.origin().to_float2(), - size: bounds.size().to_float2(), + origin: bounds.origin().round().to_float2(), + size: bounds.size().round().to_float2(), background_color: quad .background .unwrap_or(ColorU::transparent_black())