From d10a413a2ff34eb6f954c7a4ed374bada0e5f6bb Mon Sep 17 00:00:00 2001 From: William Candillon Date: Tue, 5 Nov 2024 23:31:58 +0100 Subject: [PATCH] =?UTF-8?q?fix(=F0=9F=92=9A):=20fix=20regression=20with=20?= =?UTF-8?q?pixel=20density=20on=20iOS=20(#2726)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h b/packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h index 0042b57500..920f5b873c 100644 --- a/packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h +++ b/packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h @@ -54,7 +54,7 @@ class IOSSkiaContext : public RNSkia::WindowContext { _layer.framebufferOnly = NO; _layer.device = MTLCreateSystemDefaultDevice(); _layer.opaque = false; - _layer.contentsScale = 3; + _layer.contentsScale = [UIScreen mainScreen].scale; _layer.pixelFormat = MTLPixelFormatBGRA8Unorm; _layer.contentsGravity = kCAGravityBottomLeft; _layer.drawableSize = CGSizeMake(width, height);