From 5f1f49b01110a2c6e53b9df6a70c746474798ceb Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 6 Apr 2021 13:53:20 +0200 Subject: [PATCH] Reduce path atlas size by using a single channel for the texture --- 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 55cf45e94c..1c6b64a4c2 100644 --- a/gpui/src/platform/mac/renderer.rs +++ b/gpui/src/platform/mac/renderer.rs @@ -65,7 +65,7 @@ impl Renderer { ); let sprite_cache = SpriteCache::new(device.clone(), vec2i(1024, 768), fonts); - let path_atlases = build_path_atlas_allocator(pixel_format, &device); + let path_atlases = build_path_atlas_allocator(MTLPixelFormat::R8Unorm, &device); let quad_pipeline_state = build_pipeline_state( &device, &library, @@ -96,7 +96,7 @@ impl Renderer { "path_atlas", "path_atlas_vertex", "path_atlas_fragment", - pixel_format, + MTLPixelFormat::R8Unorm, )?; Ok(Self { sprite_cache,