Add missing ID2D1DrawInfo::AddRef calls

このコミットが含まれているのは:
Sergio Pedri committed 2022-05-28 13:55:33 +02:00
1 親 745f23a3a1
コミット 5e94c4b3ad
3ファイル変更
+30

検索条件に一致するファイルはありません

@@ -321,6 +321,15 @@ partial struct PixelShaderEffect
{
@this = (PixelShaderEffect*)&((void**)@this)[-1];
// Free the previous ID2D1DrawInfo object, if present
if (@this->d2D1DrawInfo is not null)
{
_ = @this->d2D1DrawInfo->Release();
}
// Store the new ID2D1DrawInfo object
_ = drawInfo->AddRef();
@this->d2D1DrawInfo = drawInfo;
// Set the pixel shader for the effect
+5
ファイルの表示
@@ -374,6 +374,11 @@ internal unsafe partial struct PixelShaderEffect
this.d2D1TransformMapperHandle.Free();
if (this.d2D1DrawInfo is not null)
{
_ = this.d2D1DrawInfo->Release();
}
NativeMemory.Free(Unsafe.AsPointer(ref this));
}
+16
ファイルの表示
@@ -20,6 +20,22 @@ namespace TerraFX.Interop.DirectX
{
public void** lpVtbl;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall]<IUnknown*, uint>)(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall]<IUnknown*, uint>)(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public HRESULT SetInputDescription([NativeTypeName("UINT32")] uint inputIndex, D2D1_INPUT_DESCRIPTION inputDescription)