Browse Source

Use the Direct2D 1.1 render target initialization.

To prevent D2D from auto-stretching our render target to the window size
(which causes problems now we're multi-threaded) we have to move to the
D2D1.1 render target initialization. I used the info here to work out
how to do this:

https://katyscode.wordpress.com/2013/01/23/migrating-existing-direct2d-applications-to-use-direct2d-1-1-functionality-in-windows-7/
- it's not exactly simple!
scenegraph-after-breakage
Steven Kirk 10 years ago
parent
commit
932f489faa
  1. 4
      samples/BindingTest/App.config
  2. 8
      samples/ControlCatalog.Desktop/App.config
  3. 8
      samples/RenderTest/App.config
  4. 4
      samples/TestApplication/App.config
  5. 8
      samples/VirtualizationTest/App.config
  6. 4
      samples/XamlTestApplication/App.config
  7. 14
      samples/interop/WindowsInteropTest/App.config
  8. 13
      src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj
  9. 2
      src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs
  10. 178
      src/Windows/Avalonia.Direct2D1/HwndRenderTarget.cs
  11. 10
      src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
  12. 1
      src/Windows/Avalonia.Direct2D1/Media/TileBrushImpl.cs
  13. 83
      src/Windows/Avalonia.Direct2D1/RenderTarget.cs
  14. 4
      src/Windows/Avalonia.Direct2D1/app.config
  15. 5
      src/Windows/Avalonia.Direct2D1/packages.config
  16. 14
      tests/Avalonia.DesignerSupport.TestApp/App.config
  17. 4
      tests/Avalonia.Direct2D1.UnitTests/app.config
  18. 4
      tests/Avalonia.RenderTests/app.config

4
samples/BindingTest/App.config

@ -7,11 +7,11 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />

8
samples/ControlCatalog.Desktop/App.config

@ -9,6 +9,14 @@
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

8
samples/RenderTest/App.config

@ -9,6 +9,14 @@
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

4
samples/TestApplication/App.config

@ -11,11 +11,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />

8
samples/VirtualizationTest/App.config

@ -9,6 +9,14 @@
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

4
samples/XamlTestApplication/App.config

@ -11,11 +11,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

14
samples/interop/WindowsInteropTest/App.config

@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

13
src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj

@ -37,16 +37,20 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="SharpDX, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.3.1.0\lib\net45\SharpDX.dll</HintPath>
<Reference Include="SharpDX, Version=3.1.1.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.3.1.1\lib\net45\SharpDX.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpDX.Direct2D1, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.Direct2D1.3.1.0\lib\net45\SharpDX.Direct2D1.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpDX.DXGI, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.DXGI.3.1.0\lib\net45\SharpDX.DXGI.dll</HintPath>
<Reference Include="SharpDX.Direct3D11, Version=3.1.1.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.Direct3D11.3.1.1\lib\net45\SharpDX.Direct3D11.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpDX.DXGI, Version=3.1.1.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SharpDX.DXGI.3.1.1\lib\net45\SharpDX.DXGI.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -79,6 +83,7 @@
<Compile Include="Media\FormattedTextImpl.cs" />
<Compile Include="PrimitiveExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="HwndRenderTarget.cs" />
<Compile Include="RenderTarget.cs" />
</ItemGroup>
<ItemGroup>

2
src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs

@ -83,7 +83,7 @@ namespace Avalonia.Direct2D1
{
if (handle.HandleDescriptor == "HWND")
{
return new RenderTarget(handle.Handle);
return new HwndRenderTarget(handle.Handle);
}
else
{

178
src/Windows/Avalonia.Direct2D1/HwndRenderTarget.cs

@ -0,0 +1,178 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Direct2D1.Media;
using Avalonia.Media;
using Avalonia.Platform;
using Avalonia.Win32.Interop;
using SharpDX;
using SharpDX.Direct2D1;
namespace Avalonia.Direct2D1
{
public class HwndRenderTarget : IRenderTarget
{
private readonly IntPtr _hwnd;
private readonly SharpDX.Direct3D11.Device _d3dDevice;
private DeviceContext _deviceContext;
private SharpDX.DXGI.SwapChain1 _swapChain;
private Size2 _savedSize;
private Size2F _savedDpi;
/// <summary>
/// Initializes a new instance of the <see cref="HwndRenderTarget"/> class.
/// </summary>
/// <param name="hwnd">The window handle.</param>
public HwndRenderTarget(IntPtr hwnd)
{
_hwnd = hwnd;
Direct2DFactory = AvaloniaLocator.Current.GetService<Factory>();
DirectWriteFactory = AvaloniaLocator.Current.GetService<SharpDX.DirectWrite.Factory>();
var featureLevels = new[]
{
SharpDX.Direct3D.FeatureLevel.Level_12_1,
SharpDX.Direct3D.FeatureLevel.Level_12_0,
SharpDX.Direct3D.FeatureLevel.Level_11_1,
SharpDX.Direct3D.FeatureLevel.Level_11_0,
SharpDX.Direct3D.FeatureLevel.Level_10_1,
SharpDX.Direct3D.FeatureLevel.Level_10_0,
SharpDX.Direct3D.FeatureLevel.Level_9_3,
SharpDX.Direct3D.FeatureLevel.Level_9_2,
SharpDX.Direct3D.FeatureLevel.Level_9_1,
};
_d3dDevice = new SharpDX.Direct3D11.Device(
SharpDX.Direct3D.DriverType.Hardware,
SharpDX.Direct3D11.DeviceCreationFlags.BgraSupport,
featureLevels);
CreateSwapChain();
}
/// <summary>
/// Gets the Direct2D factory.
/// </summary>
public Factory Direct2DFactory
{
get;
}
/// <summary>
/// Gets the DirectWrite factory.
/// </summary>
public SharpDX.DirectWrite.Factory DirectWriteFactory
{
get;
}
/// <summary>
/// Creates a drawing context for a rendering session.
/// </summary>
/// <returns>An <see cref="Avalonia.Media.DrawingContext"/>.</returns>
public IDrawingContextImpl CreateDrawingContext()
{
var size = GetWindowSize();
var dpi = GetWindowDpi();
if (size != _savedSize || dpi != _savedDpi)
{
_savedSize = size;
_savedDpi = dpi;
CreateSwapChain();
}
return new DrawingContextImpl(_deviceContext, DirectWriteFactory, _swapChain);
}
public void Dispose()
{
_deviceContext.Dispose();
_swapChain.Dispose();
_d3dDevice.Dispose();
}
private void CreateSwapChain()
{
using (var dxgiDevice = _d3dDevice.QueryInterface<SharpDX.DXGI.Device>())
using (var d2dDevice = new Device(dxgiDevice))
using (var dxgiAdaptor = dxgiDevice.Adapter)
using (var dxgiFactory = dxgiAdaptor.GetParent<SharpDX.DXGI.Factory2>())
{
_deviceContext?.Dispose();
_deviceContext = new DeviceContext(d2dDevice, DeviceContextOptions.None);
var swapChainDesc = new SharpDX.DXGI.SwapChainDescription1
{
Width = 0,
Height = 0,
Format = SharpDX.DXGI.Format.B8G8R8A8_UNorm,
Stereo = false,
SampleDescription = new SharpDX.DXGI.SampleDescription
{
Count = 1,
Quality = 0,
},
Usage = SharpDX.DXGI.Usage.RenderTargetOutput,
BufferCount = 2,
Scaling = SharpDX.DXGI.Scaling.None,
SwapEffect = SharpDX.DXGI.SwapEffect.FlipSequential,
Flags = 0,
};
var dpi = Direct2DFactory.DesktopDpi;
_swapChain?.Dispose();
_swapChain = new SharpDX.DXGI.SwapChain1(dxgiFactory, _d3dDevice, _hwnd, ref swapChainDesc);
using (var dxgiBackBuffer = _swapChain.GetBackBuffer<SharpDX.DXGI.Surface>(0))
using (var d2dBackBuffer = new Bitmap1(
_deviceContext,
dxgiBackBuffer,
new BitmapProperties1(
new PixelFormat
{
AlphaMode = AlphaMode.Ignore,
Format = SharpDX.DXGI.Format.B8G8R8A8_UNorm
},
dpi.Width,
dpi.Height,
BitmapOptions.Target | BitmapOptions.CannotDraw)))
{
_deviceContext.Target = d2dBackBuffer;
}
}
}
private Size2F GetWindowDpi()
{
if (UnmanagedMethods.ShCoreAvailable)
{
uint dpix, dpiy;
var monitor = UnmanagedMethods.MonitorFromWindow(
_hwnd,
UnmanagedMethods.MONITOR.MONITOR_DEFAULTTONEAREST);
if (UnmanagedMethods.GetDpiForMonitor(
monitor,
UnmanagedMethods.MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI,
out dpix,
out dpiy) == 0)
{
return new Size2F(dpix, dpiy);
}
}
return new Size2F(96, 96);
}
private Size2 GetWindowSize()
{
UnmanagedMethods.RECT rc;
UnmanagedMethods.GetClientRect(_hwnd, out rc);
return new Size2(rc.right - rc.left, rc.bottom - rc.top);
}
}
}

10
src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs

@ -19,6 +19,7 @@ namespace Avalonia.Direct2D1.Media
public class DrawingContextImpl : IDrawingContextImpl, IDisposable
{
private readonly SharpDX.Direct2D1.RenderTarget _renderTarget;
private readonly SharpDX.DXGI.SwapChain1 _swapChain;
private SharpDX.DirectWrite.Factory _directWriteFactory;
/// <summary>
@ -28,9 +29,11 @@ namespace Avalonia.Direct2D1.Media
/// <param name="directWriteFactory">The DirectWrite factory.</param>
public DrawingContextImpl(
SharpDX.Direct2D1.RenderTarget renderTarget,
SharpDX.DirectWrite.Factory directWriteFactory)
SharpDX.DirectWrite.Factory directWriteFactory,
SharpDX.DXGI.SwapChain1 swapChain = null)
{
_renderTarget = renderTarget;
_swapChain = swapChain;
_directWriteFactory = directWriteFactory;
_renderTarget.BeginDraw();
}
@ -60,6 +63,11 @@ namespace Avalonia.Direct2D1.Media
try
{
_renderTarget.EndDraw();
if (_swapChain != null)
{
_swapChain.Present(1, SharpDX.DXGI.PresentFlags.None);
}
}
catch (SharpDXException ex) when((uint)ex.HResult == 0x8899000C) // D2DERR_RECREATE_TARGET
{

1
src/Windows/Avalonia.Direct2D1/Media/TileBrushImpl.cs

@ -1,6 +1,7 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Media;
using Avalonia.RenderHelpers;
using SharpDX.Direct2D1;

83
src/Windows/Avalonia.Direct2D1/RenderTarget.cs

@ -5,53 +5,18 @@ using System;
using Avalonia.Direct2D1.Media;
using Avalonia.Media;
using Avalonia.Platform;
using Avalonia.Win32.Interop;
using SharpDX;
using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop;
using DrawingContext = Avalonia.Media.DrawingContext;
using DwFactory = SharpDX.DirectWrite.Factory;
namespace Avalonia.Direct2D1
{
public class RenderTarget : IRenderTarget
{
private readonly IntPtr _hwnd;
private Size2 _savedSize;
private Size2F _savedDpi;
/// <summary>
/// The render target.
/// </summary>
private readonly SharpDX.Direct2D1.RenderTarget _renderTarget;
/// <summary>
/// Initializes a new instance of the <see cref="RenderTarget"/> class.
/// </summary>
/// <param name="hwnd">The window handle.</param>
public RenderTarget(IntPtr hwnd)
{
_hwnd = hwnd;
Direct2DFactory = AvaloniaLocator.Current.GetService<Factory>();
DirectWriteFactory = AvaloniaLocator.Current.GetService<DwFactory>();
RenderTargetProperties renderTargetProperties = new RenderTargetProperties
{
};
HwndRenderTargetProperties hwndProperties = new HwndRenderTargetProperties
{
Hwnd = hwnd,
PixelSize = _savedSize = GetWindowSize(),
PresentOptions = PresentOptions.Immediately,
};
_renderTarget = new WindowRenderTarget(
Direct2DFactory,
renderTargetProperties,
hwndProperties);
}
/// <summary>
/// Initializes a new instance of the <see cref="RenderTarget"/> class.
/// </summary>
@ -85,24 +50,6 @@ namespace Avalonia.Direct2D1
/// <returns>An <see cref="Avalonia.Media.DrawingContext"/>.</returns>
public IDrawingContextImpl CreateDrawingContext()
{
var window = _renderTarget as WindowRenderTarget;
if (window != null)
{
var size = GetWindowSize();
var dpi = GetWindowDpi();
if (size != _savedSize)
{
window.Resize(_savedSize = size);
}
if (dpi != _savedDpi)
{
window.DotsPerInch = _savedDpi = dpi;
}
}
return new DrawingContextImpl(_renderTarget, DirectWriteFactory);
}
@ -110,35 +57,5 @@ namespace Avalonia.Direct2D1
{
_renderTarget.Dispose();
}
private Size2F GetWindowDpi()
{
if (UnmanagedMethods.ShCoreAvailable)
{
uint dpix, dpiy;
var monitor = UnmanagedMethods.MonitorFromWindow(
_hwnd,
UnmanagedMethods.MONITOR.MONITOR_DEFAULTTONEAREST);
if (UnmanagedMethods.GetDpiForMonitor(
monitor,
UnmanagedMethods.MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI,
out dpix,
out dpiy) == 0)
{
return new Size2F(dpix, dpiy);
}
}
return new Size2F(96, 96);
}
private Size2 GetWindowSize()
{
UnmanagedMethods.RECT rc;
UnmanagedMethods.GetClientRect(_hwnd, out rc);
return new Size2(rc.right - rc.left, rc.bottom - rc.top);
}
}
}

4
src/Windows/Avalonia.Direct2D1/app.config

@ -8,11 +8,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

5
src/Windows/Avalonia.Direct2D1/packages.config

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpDX" version="3.1.0" targetFramework="net45" />
<package id="SharpDX" version="3.1.1" targetFramework="net45" />
<package id="SharpDX.Direct2D1" version="3.1.0" targetFramework="net45" />
<package id="SharpDX.DXGI" version="3.1.0" targetFramework="net45" />
<package id="SharpDX.Direct3D11" version="3.1.1" targetFramework="net45" />
<package id="SharpDX.DXGI" version="3.1.1" targetFramework="net45" />
</packages>

14
tests/Avalonia.DesignerSupport.TestApp/App.config

@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

4
tests/Avalonia.Direct2D1.UnitTests/app.config

@ -4,11 +4,11 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

4
tests/Avalonia.RenderTests/app.config

@ -8,11 +8,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Mono.Cairo" publicKeyToken="0738eb9f132ed756" culture="neutral" />

Loading…
Cancel
Save