Julien Lebosquain
2 months ago
No known key found for this signature in database
GPG Key ID: 1833CAD10ACC46FD
1 changed files with
8 additions and
0 deletions
-
src/Skia/Avalonia.Skia/FramebufferRenderTarget.cs
|
|
|
@ -125,6 +125,14 @@ namespace Avalonia.Skia |
|
|
|
|
|
|
|
_currentFramebufferAddress = framebuffer.Address; |
|
|
|
|
|
|
|
// A surface with a width/height of 0 is invalid and can't be created
|
|
|
|
if (desiredImageInfo.Width <= 0 || desiredImageInfo.Height <= 0) |
|
|
|
{ |
|
|
|
throw new ArgumentException( |
|
|
|
$"Unable to create a surface with size {desiredImageInfo.Width}x{desiredImageInfo.Height}", |
|
|
|
nameof(desiredImageInfo)); |
|
|
|
} |
|
|
|
|
|
|
|
var surface = SKSurface.Create(desiredImageInfo, _currentFramebufferAddress, |
|
|
|
framebuffer.RowBytes, new SKSurfaceProperties(SKPixelGeometry.RgbHorizontal)); |
|
|
|
|
|
|
|
|