Browse Source
Merge branch 'master' into fixes/4640-show-fullscreen-win32
pull/4642/head
danwalmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.Visuals/Rendering/RenderLayer.cs
|
|
|
@ -30,12 +30,13 @@ namespace Avalonia.Rendering |
|
|
|
{ |
|
|
|
if (Size != size || Scaling != scaling) |
|
|
|
{ |
|
|
|
Bitmap.Dispose(); |
|
|
|
var resized = RefCountable.Create(drawingContext.CreateLayer(size)); |
|
|
|
|
|
|
|
using (var context = resized.Item.CreateDrawingContext(null)) |
|
|
|
{ |
|
|
|
context.Clear(Colors.Transparent); |
|
|
|
Bitmap.Dispose(); |
|
|
|
|
|
|
|
Bitmap = resized; |
|
|
|
Scaling = scaling; |
|
|
|
Size = size; |
|
|
|
|