Browse Source

explicit dispose skia objects (#19100)

release/11.3.3
Vadym Artemchuk 7 months ago
committed by Julien Lebosquain
parent
commit
d5f490cf2f
  1. 6
      src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs

6
src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs

@ -89,10 +89,10 @@ namespace Avalonia.Skia
throw new OpenGlException("Unable to create FBO with stencil");
}
var target = new GRBackendRenderTarget(pixelSize.Width, pixelSize.Height, 0, 8,
using var target = new GRBackendRenderTarget(pixelSize.Width, pixelSize.Height, 0, 8,
new GRGlFramebufferInfo((uint)_fbo, SKColorType.Rgba8888.ToGlSizedFormat()));
_surface = SKSurface.Create(_grContext, target,
surfaceOrigin, SKColorType.Rgba8888, new SKSurfaceProperties(SKPixelGeometry.RgbHorizontal));
using var properties = new SKSurfaceProperties(SKPixelGeometry.RgbHorizontal);
_surface = SKSurface.Create(_grContext, target, surfaceOrigin, SKColorType.Rgba8888, properties);
CanBlit = gl.IsBlitFramebufferAvailable;
}

Loading…
Cancel
Save