Browse Source

ensure we have valid surface with min size (1,1)

pull/5251/head
Andrey Kunchev 5 years ago
parent
commit
78c2415462
  1. 6
      native/Avalonia.Native/src/OSX/rendertarget.mm

6
native/Avalonia.Native/src/OSX/rendertarget.mm

@ -149,6 +149,12 @@ static IAvnGlSurfaceRenderTarget* CreateGlRenderTarget(IOSurfaceRenderTarget* ta
}
- (void)resize:(AvnPixelSize)size withScale: (float) scale{
if(size.Height <= 0)
size.Height = 1;
if(size.Width <= 0)
size.Width = 1;
@synchronized (lock) {
if(surface == nil
|| surface->size.Width != size.Width

Loading…
Cancel
Save