Skip to content

Commit fe53ab4

Browse files
committed
chore: Win32 adjustments
1 parent 0025709 commit fe53ab4

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/Uno.UI.Runtime.Skia.MacOS/UI/Xaml/Window/MacOSWindowHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void IXamlRootHost.InvalidateRender()
219219
var (picture, path) = SkiaRenderHelper.RecordPictureAndReturnPath(
220220
(int)_nativeWindowSize.Width,
221221
(int)_nativeWindowSize.Height,
222-
rootElement.Visual,
222+
rootElement,
223223
invertPath: false);
224224

225225
Interlocked.Exchange(ref _picture, picture);

src/Uno.UI.Runtime.Skia.Win32/UI/Xaml/Window/Win32WindowWrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ internal partial class Win32WindowWrapper : NativeWindowWrapperBase, IXamlRootHo
5858
private SKColor _background;
5959
private bool _isFirstEraseBkgnd = true;
6060

61-
private SKPicture _picture;
62-
private SKPath _clipPath;
61+
private SKPicture? _picture;
62+
private SKPath? _clipPath;
6363

6464
static unsafe Win32WindowWrapper()
6565
{

src/Uno.UI.Runtime.Skia.Wpf/Hosting/IWpfXamlRootHost.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal interface IWpfXamlRootHost : IXamlRootHost
1414

1515
RenderSurfaceType? RenderSurfaceType { get; }
1616

17-
SKPicture? Picture { get; set; }
17+
SKPicture? Picture { get; }
1818

19-
SKPath? ClipPath { get; set; }
19+
SKPath? ClipPath { get; }
2020
}

src/Uno.UI.Runtime.Skia.Wpf/UI/Xaml/Window/UnoWpfWindowHost.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ internal class UnoWpfWindowHost : WpfControl, IWpfWindowHost
6363

6464
private readonly SerialDisposable _backgroundDisposable = new();
6565

66-
private SKPicture _picture;
67-
private SKPath _clipPath;
66+
private SKPicture? _picture;
67+
private SKPath? _clipPath;
6868

6969
public UnoWpfWindowHost(UnoWpfWindow wpfWindow, MUX.Window winUIWindow)
7070
{
@@ -94,8 +94,8 @@ public UnoWpfWindowHost(UnoWpfWindow wpfWindow, MUX.Window winUIWindow)
9494
public WpfControl RenderLayer => _renderLayer;
9595
public WpfControl BottomLayer => _renderLayer;
9696

97-
public SKPicture Picture => _picture;
98-
public SKPath ClipPath => _clipPath;
97+
SKPicture? IWpfXamlRootHost.Picture => _picture;
98+
SKPath? IWpfXamlRootHost.ClipPath => _clipPath;
9999

100100
internal void InitializeRenderer()
101101
{

src/Uno.UI/Helpers/SkiaRenderHelper.skia.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ namespace Uno.UI.Helpers;
1616
internal static class SkiaRenderHelper
1717
{
1818
internal static bool CanRecordPicture([NotNullWhen(true)] UIElement? rootElement) =>
19-
rootElement is null ||
20-
rootElement.IsArrangeDirtyOrArrangeDirtyPath ||
21-
rootElement.IsMeasureDirtyOrMeasureDirtyPath;
19+
rootElement is not null &&
20+
!rootElement.IsArrangeDirtyOrArrangeDirtyPath &&
21+
!rootElement.IsMeasureDirtyOrMeasureDirtyPath;
2222

2323
internal static (SKPicture, SKPath) RecordPictureAndReturnPath(int width, int height, UIElement rootElement, bool invertPath)
2424
{

0 commit comments

Comments
 (0)