コミットを比較
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
|
|
15e0cccdcc
|
||
|
|
b07d5b8937
|
||
|
|
bfc35b3931
|
||
|
|
a2531d96e8
|
検索条件に一致するファイルはありません
@@ -537,7 +537,7 @@ public sealed class UkiyoeEffectTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Direct2DInteropProducesPrintFromOpaqueCore()
|
||||
public void Direct2DInteropProducesPrintAfterGrowingFullHdOutput()
|
||||
{
|
||||
using var devices = new GraphicsDevices();
|
||||
using var graphicsContext = devices.CreateContext();
|
||||
@@ -574,7 +574,6 @@ public sealed class UkiyoeEffectTests
|
||||
}
|
||||
|
||||
Assert.True(resourceSet.TryEnsureSource(width, height, out _));
|
||||
Assert.True(resourceSet.TryEnsureOutput(width, height, out _));
|
||||
var parameters = CreateParameters();
|
||||
var renderContext = provider.RenderContext;
|
||||
for (var iteration = 0; iteration < 2; iteration++)
|
||||
@@ -598,8 +597,19 @@ public sealed class UkiyoeEffectTests
|
||||
pipeline!.Simulate(
|
||||
resourceSet.GetSourceComputeBinding(), width, height, 0, 0, width, height, in parameters);
|
||||
Assert.True(pipeline.TryGetVisibleBounds(width, height, in parameters, out var visible));
|
||||
Assert.True(resourceSet.TryEnsureOutput(
|
||||
iteration == 0 ? width : 1920,
|
||||
iteration == 0 ? height : 1080,
|
||||
out _));
|
||||
pipeline.RenderVisible(
|
||||
resourceSet.GetOutputComputeBinding(), width, height, visible, in parameters);
|
||||
|
||||
if (iteration == 0)
|
||||
{
|
||||
using var retiredLease = resourceSet.AcquireOutputExternalViewLease();
|
||||
Assert.Equal(width, retiredLease.Width);
|
||||
Assert.Equal(height, retiredLease.Height);
|
||||
}
|
||||
}
|
||||
|
||||
using var outputLease = resourceSet.AcquireOutputExternalViewLease();
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>1.0.1</Version>
|
||||
<Version>1.0.2</Version>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
@@ -83,7 +83,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ComputeWeave" Version="1.1.4" />
|
||||
<PackageReference Include="ComputeWeave" Version="1.4.1" />
|
||||
<PackageReference Include="ILRepack" Version="2.0.46" PrivateAssets="all" ExcludeAssets="all" GeneratePathProperty="true" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.142" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -18,8 +18,6 @@ internal sealed class UkiyoeEffectProcessor : VideoEffectProcessorBase
|
||||
private ExternalTextureLease<UkiyoeExternalView>? _outputLease;
|
||||
private int _sourceWidth;
|
||||
private int _sourceHeight;
|
||||
private int _outputPhysicalWidth;
|
||||
private int _outputPhysicalHeight;
|
||||
private UkiyoePipeline? _pipeline;
|
||||
private UkiyoeCustomEffect? _effect;
|
||||
private Crop? _outputCrop;
|
||||
@@ -238,7 +236,9 @@ internal sealed class UkiyoeEffectProcessor : VideoEffectProcessorBase
|
||||
}
|
||||
|
||||
private bool OutputCovers(int width, int height)
|
||||
=> _outputLease is not null && _outputPhysicalWidth >= width && _outputPhysicalHeight >= height;
|
||||
=> _outputLease is { IsDisposed: false } lease &&
|
||||
lease.Width >= width &&
|
||||
lease.Height >= height;
|
||||
|
||||
private bool EnsureOutput(int width, int height, out bool changed)
|
||||
{
|
||||
@@ -248,20 +248,7 @@ internal sealed class UkiyoeEffectProcessor : VideoEffectProcessorBase
|
||||
|
||||
_outputLease?.Dispose();
|
||||
_outputLease = null;
|
||||
if (!_resourceSet!.TryEnsureOutput(width, height, out changed))
|
||||
{
|
||||
_outputPhysicalWidth = 0;
|
||||
_outputPhysicalHeight = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
{
|
||||
_outputPhysicalWidth = width;
|
||||
_outputPhysicalHeight = height;
|
||||
}
|
||||
|
||||
return true;
|
||||
return _resourceSet!.TryEnsureOutput(width, height, out changed);
|
||||
}
|
||||
|
||||
private void RenderInput(Vortice.RawRectF bounds)
|
||||
@@ -298,8 +285,6 @@ internal sealed class UkiyoeEffectProcessor : VideoEffectProcessorBase
|
||||
_interopProvider = null;
|
||||
_sourceWidth = 0;
|
||||
_sourceHeight = 0;
|
||||
_outputPhysicalWidth = 0;
|
||||
_outputPhysicalHeight = 0;
|
||||
}
|
||||
|
||||
protected override ID2D1Image? CreateEffect(IGraphicsDevicesAndContext devices)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする