From c9e34148a99e73204dbde2b3db9fbe51b41ee48e Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:29:58 -0800 Subject: [PATCH] Fix scaling of atlas slab size for negative zoom levels Part of #233913 --- src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts b/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts index b41fed6978c..461fd507dbe 100644 --- a/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts +++ b/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts @@ -55,7 +55,7 @@ export class TextureAtlasSlabAllocator implements ITextureAtlasAllocator { })); this._slabW = Math.min( - options?.slabW ?? (64 << (Math.floor(getActiveWindow().devicePixelRatio) - 1)), + options?.slabW ?? (64 << Math.max(Math.floor(getActiveWindow().devicePixelRatio) - 1, 0)), this._canvas.width ); this._slabH = Math.min(