Skip to content

Commit

Permalink
Update to Avalonia 0.10.8 -- better performance in X11
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Oct 11, 2021
1 parent d818312 commit 1cdb244
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 4 additions & 6 deletions fvim.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.7" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.7" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.7" />
<PackageReference Include="Avalonia.Svg" Version="0.10.7.1" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.8" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.8" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.8" />
<PackageReference Include="Avalonia.Svg" Version="0.10.8" />

<PackageReference Include="FSharp.Control.Reactive" Version="5.0.2" />
<PackageReference Include="FSharp.Data" Version="4.2.2" />
Expand All @@ -95,7 +94,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Svg.Model" Version="0.5.7.1" />
<PackageReference Include="TaskBuilder.fs" Version="2.1.0" />
<PackageReference Include="UACHelper" Version="1.3.0.5" />
</ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions svg.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ open Avalonia.Svg
let private s_assetLoader = new AvaloniaAssetLoader() :> Svg.Model.IAssetLoader
let private s_factory = AvaloniaLocator.Current.GetService<Platform.IPlatformRenderInterface>()

// ported from: https://github.com/wieslawsoltes/Svg.Skia/blob/master/src/Avalonia.Svg/AvaloniaPicture.cs
type SvgPicture(data: string) =
let svg = Svg.SvgDocument.FromSvg(data)
let picture =
match Svg.Model.SvgExtensions.ToModel(svg, s_assetLoader) with
let picture: SKPicture =
match Svg.Model.SvgExtensions.ToModel(svg, s_assetLoader, ignoreAttributes=Unchecked.defaultof<_>) with
| pic,_,_ -> pic
let _commands = ResizeArray<DrawCommand>()
let mutable m_brush: SolidColorBrush = null
Expand Down

0 comments on commit 1cdb244

Please sign in to comment.