Store ID2D1EffectContext in the ID2D1Effect object

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-15 15:01:16 +02:00
1 親 47cafd0145
コミット b2b445d3a8
2ファイル変更
+29 -1

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

@@ -128,11 +128,27 @@ internal unsafe partial struct PixelShaderEffect
}
}
// If loading the bytecode succeeded, set the transform node
if (Windows.SUCCEEDED(hresult))
{
hresult = transformGraph->SetSingleTransformNode((ID2D1TransformNode*)&@this->lpVtblForID2D1DrawTransform);
}
// If the transform node was set, also store the effect context
if (Windows.SUCCEEDED(hresult))
{
// Free the previous ID2D1EffectContext object, if present
if (@this->d2D1EffectContext is not null)
{
_ = @this->d2D1EffectContext->Release();
}
// Store the new ID2D1EffectContext object
_ = effectContext->AddRef();
@this->d2D1EffectContext = effectContext;
}
return hresult;
}