Max Katz
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
1 deletions
-
native/Avalonia.Native/src/OSX/metal.mm
-
src/iOS/Avalonia.iOS/AvaloniaView.cs
|
|
|
@ -112,6 +112,7 @@ public: |
|
|
|
- (MetalRenderTarget *)initWithDevice:(IAvnMetalDevice *)device { |
|
|
|
_device = dynamic_cast<AvnMetalDevice*>(device); |
|
|
|
_layer = [CAMetalLayer new]; |
|
|
|
_layer.opaque = false; |
|
|
|
_layer.device = _device->device; |
|
|
|
_target.setNoAddRef(new AvnMetalRenderTarget(_layer, _device)); |
|
|
|
return self; |
|
|
|
@ -158,4 +159,4 @@ static AvnMetalDisplay* _display = new AvnMetalDisplay(); |
|
|
|
extern IAvnMetalDisplay* GetMetalDisplay() |
|
|
|
{ |
|
|
|
return _display; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -98,6 +98,7 @@ namespace Avalonia.iOS |
|
|
|
#endif
|
|
|
|
if (l is CAMetalLayer metalLayer) |
|
|
|
{ |
|
|
|
metalLayer.Opaque = false; |
|
|
|
_topLevelImpl.Surfaces = new[] { new Metal.MetalPlatformSurface(metalLayer, this) }; |
|
|
|
} |
|
|
|
} |
|
|
|
|