|
|
|
@ -5,7 +5,6 @@ using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading; |
|
|
|
using Avalonia.Media; |
|
|
|
using Avalonia.Media.Immutable; |
|
|
|
using Avalonia.Platform; |
|
|
|
@ -13,7 +12,6 @@ using Avalonia.Rendering.SceneGraph; |
|
|
|
using Avalonia.Threading; |
|
|
|
using Avalonia.Utilities; |
|
|
|
using Avalonia.VisualTree; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace Avalonia.Rendering |
|
|
|
{ |
|
|
|
@ -33,7 +31,6 @@ namespace Avalonia.Rendering |
|
|
|
private volatile IRef<Scene> _scene; |
|
|
|
private DirtyVisuals _dirty; |
|
|
|
private IRef<IRenderTargetBitmapImpl> _overlay; |
|
|
|
private object _rendering = new object(); |
|
|
|
private int _lastSceneId = -1; |
|
|
|
private DisplayDirtyRects _dirtyRectsDisplay = new DisplayDirtyRects(); |
|
|
|
private IRef<IDrawOperation> _currentDraw; |
|
|
|
@ -267,7 +264,7 @@ namespace Avalonia.Rendering |
|
|
|
RenderOverlay(scene.Item, GetContext()); |
|
|
|
if (updated || forceComposite || overlay) |
|
|
|
RenderComposite(scene.Item, GetContext()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
finally |
|
|
|
@ -321,15 +318,15 @@ namespace Avalonia.Rendering |
|
|
|
var (rs, _) = UpdateRenderLayersAndConsumeSceneIfNeeded(contextFactory, true); |
|
|
|
return (rs, true); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Indicate that we have updated the layers
|
|
|
|
return (sceneRef.Clone(), true); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Just return scene, layers weren't updated
|
|
|
|
return (sceneRef.Clone(), false); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -456,7 +453,7 @@ namespace Avalonia.Rendering |
|
|
|
private void RenderComposite(Scene scene, IDrawingContextImpl context) |
|
|
|
{ |
|
|
|
context.Clear(Colors.Transparent); |
|
|
|
|
|
|
|
|
|
|
|
var clientRect = new Rect(scene.Size); |
|
|
|
|
|
|
|
foreach (var layer in scene.Layers) |
|
|
|
|