From 7523df05cf0d12b4d40d1ef3b0b337f6359f4cee Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 23 Mar 2021 19:02:03 -0600 Subject: [PATCH] Space out sprites in atlas This prevents us from accidentally sampling a neighboring sprite. --- gpui/src/platform/mac/sprite_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpui/src/platform/mac/sprite_cache.rs b/gpui/src/platform/mac/sprite_cache.rs index 97bed4141c..96a72ddebb 100644 --- a/gpui/src/platform/mac/sprite_cache.rs +++ b/gpui/src/platform/mac/sprite_cache.rs @@ -105,7 +105,7 @@ impl Atlas { fn try_insert(&mut self, size: Vector2I, mask: &[u8]) -> Option { let allocation = self .allocator - .allocate(etagere::size2(size.x(), size.y()))?; + .allocate(etagere::size2(size.x() + 1, size.y() + 1))?; let bounds = allocation.rectangle; let region = metal::MTLRegion::new_2d(