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