From 9e9e17348fcd450c995e53729867d4706fe77933 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 10 Dec 2018 12:34:57 +0100 Subject: [PATCH] [dxgi] DxgiSwapchain: Remove SetGammaControl methods These were only used internally to forward stuff to the presenter anyway, so we might as well call that method directly. --- src/dxgi/dxgi_swapchain.cpp | 14 ++------------ src/dxgi/dxgi_swapchain.h | 5 ----- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 1710d48fa..06e2be92c 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -268,7 +268,7 @@ namespace dxvk { DXGI_VK_OUTPUT_DATA outputData; if (SUCCEEDED(m_adapter->GetOutputData(m_monitor, &outputData)) && outputData.GammaDirty) { - SetGammaControl(&outputData.GammaCurve); + m_presenter->SetGammaControl(DXGI_VK_GAMMA_CP_COUNT, outputData.GammaCurve.GammaCurve); outputData.GammaDirty = FALSE; m_adapter->SetOutputData(m_monitor, &outputData); @@ -487,16 +487,6 @@ namespace dxvk { } - HRESULT DxgiSwapChain::SetGammaControl(const DXGI_GAMMA_CONTROL* pGammaControl) { - return m_presenter->SetGammaControl(DXGI_VK_GAMMA_CP_COUNT, pGammaControl->GammaCurve); - } - - - HRESULT DxgiSwapChain::SetDefaultGammaControl() { - return m_presenter->SetGammaControl(0, nullptr); - } - - VkExtent2D DxgiSwapChain::GetWindowSize() const { RECT windowRect; @@ -606,7 +596,7 @@ namespace dxvk { rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOACTIVATE); - return SetDefaultGammaControl(); + return m_presenter->SetGammaControl(0, nullptr); } diff --git a/src/dxgi/dxgi_swapchain.h b/src/dxgi/dxgi_swapchain.h index cca77bc0d..8c86b68e4 100644 --- a/src/dxgi/dxgi_swapchain.h +++ b/src/dxgi/dxgi_swapchain.h @@ -154,11 +154,6 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE SetColorSpace1( DXGI_COLOR_SPACE_TYPE ColorSpace) final; - - HRESULT SetGammaControl( - const DXGI_GAMMA_CONTROL* pGammaControl); - - HRESULT SetDefaultGammaControl(); private: