AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.06k stars 2.25k forks source link

Fix visual snapshot on headless #17565

Closed maxkatz6 closed 5 days ago

maxkatz6 commented 6 days ago

What does the pull request do?

  1. Fixes CreateCompositionVisualSnapshot method on headless platform. Compositor checks for IDrawingContextLayerWithRenderContextAffinityImpl interface, but doesn't actually check for HasRenderContextAffinity before calling CreateNonAffinedSnapshot.
  2. Add ServerVisualRenderContext.RenderChildren bool parameter.

Checklist

avaloniaui-bot commented 6 days ago

You can test this PR using the following package version. 11.3.999-cibuild0053448-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]