File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Uno.UI.Runtime.Skia.MacOS/UI/Xaml/Window Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -204,10 +204,10 @@ public static unsafe void Register()
204
204
205
205
void IXamlRootHost . InvalidateRender ( )
206
206
{
207
- if ( _winUIWindow . RootElement is not { } rootElement || ( rootElement . IsArrangeDirtyOrArrangeDirtyPath || rootElement . IsMeasureDirtyOrMeasureDirtyPath ) )
207
+ if ( ! SkiaRenderHelper . CanRecordPicture ( _winUIWindow . RootElement ) )
208
208
{
209
209
// Try again next tick
210
- NativeDispatcher . Main . Enqueue ( ( ) => ( ( IXamlRootHost ) this ) . InvalidateRender ( ) ) ;
210
+ NativeDispatcher . Main . Enqueue ( ( ) => ( ( IXamlRootHost ) this ) . InvalidateRender ( ) , NativeDispatcherPriority . Idle ) ;
211
211
return ;
212
212
}
213
213
@@ -219,14 +219,12 @@ void IXamlRootHost.InvalidateRender()
219
219
var ( picture , path ) = SkiaRenderHelper . RecordPictureAndReturnPath (
220
220
( int ) _nativeWindowSize . Width ,
221
221
( int ) _nativeWindowSize . Height ,
222
- rootElement ,
222
+ _winUIWindow . RootElement ,
223
223
invertPath : false ) ;
224
224
225
225
Interlocked . Exchange ( ref _picture , picture ) ;
226
226
Interlocked . Exchange ( ref _clipPath , path ) ;
227
227
228
- RootElement ? . XamlRoot ? . InvokeFramePainted ( ) ;
229
-
230
228
_winUIWindow . RootElement ? . XamlRoot ? . InvalidateOverlays ( ) ;
231
229
232
230
NativeUno . uno_window_invalidate ( _nativeWindow . Handle ) ;
You can’t perform that action at this time.
0 commit comments