mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
perf: 删除 CompSwapchainPresenter 中无用传参
This commit is contained in:
parent
730d73ecea
commit
19bf67e285
1 changed files with 2 additions and 4 deletions
|
|
@ -31,9 +31,7 @@ bool CompSwapchainPresenter::_Initialize(HWND hwndAttach) noexcept {
|
|||
return false;
|
||||
}
|
||||
|
||||
ID3D11Device5* d3dDevice = _deviceResources->GetD3DDevice();
|
||||
|
||||
HRESULT hr = DCompositionCreateDevice3(d3dDevice, IID_PPV_ARGS(&_dcompDevice));
|
||||
HRESULT hr = DCompositionCreateDevice3(nullptr, IID_PPV_ARGS(&_dcompDevice));
|
||||
if (FAILED(hr)) {
|
||||
Logger::Get().ComError("DCompositionCreateDevice3 失败", hr);
|
||||
return false;
|
||||
|
|
@ -58,7 +56,7 @@ bool CompSwapchainPresenter::_Initialize(HWND hwndAttach) noexcept {
|
|||
}
|
||||
|
||||
winrt::com_ptr<IPresentationFactory> presentationFactory =
|
||||
CreatePresentationFactory(d3dDevice);
|
||||
CreatePresentationFactory(_deviceResources->GetD3DDevice());
|
||||
if (!presentationFactory) {
|
||||
Logger::Get().Error("CreatePresentationFactory 失败");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue