File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
source/SkiaSharp.Views/SkiaSharp.Views/Platform/Apple Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,22 @@ private void Initialize()
92
92
93
93
ColorPixelFormat = MTLPixelFormat . BGRA8Unorm ;
94
94
DepthStencilPixelFormat = MTLPixelFormat . Depth32Float_Stencil8 ;
95
- if ( DepthStencilModePrivate )
96
- {
97
- DepthStencilStorageMode = MTLStorageMode . Private ;
98
- SampleCount = 4 ;
99
- }
100
- else
95
+ nuint sampling = 1 ;
96
+ #if __IOS__ || __TVOS__
97
+ if ( UIKit . UIDevice . CurrentDevice . CheckSystemVersion ( 16 , 0 ) )
101
98
{
102
- DepthStencilStorageMode = MTLStorageMode . Shared ;
103
- SampleCount = 2 ;
99
+ if ( DepthStencilModePrivate )
100
+ {
101
+ DepthStencilStorageMode = MTLStorageMode . Private ;
102
+ sampling = 4 ;
103
+ }
104
+ else
105
+ {
106
+ DepthStencilStorageMode = MTLStorageMode . Shared ;
107
+ }
104
108
}
109
+ #endif
110
+ SampleCount = sampling ;
105
111
FramebufferOnly = false ;
106
112
Device = device ;
107
113
backendContext = new GRMtlBackendContext
You can’t perform that action at this time.
0 commit comments