Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

d-r: Use the swap effects guaranteeing backbuffers only when the dirt…

…y regions algorithm requires it.
  • Loading branch information...
commit 718b0ac2c59925e150f414fce48b61343720de86 1 parent 2daa4f4
CrystalP CrystalP authored theuni committed

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +6 1 xbmc/rendering/dx/RenderSystemDX.cpp
7 xbmc/rendering/dx/RenderSystemDX.cpp
@@ -242,7 +242,12 @@ void CRenderSystemDX::BuildPresentParameters()
242 242
243 243 ZeroMemory( &m_D3DPP, sizeof(D3DPRESENT_PARAMETERS) );
244 244 m_D3DPP.Windowed = m_useWindowedDX;
245   - m_D3DPP.SwapEffect = D3DSWAPEFFECT_FLIP;
  245 + // Use the most efficient flip mode for the dirty region algorithms that do not require backbuffers to be preserved.
  246 + if ( g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ALWAYS
  247 + || g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ON_CHANGE)
  248 + m_D3DPP.SwapEffect = D3DSWAPEFFECT_DISCARD;
  249 + else
  250 + m_D3DPP.SwapEffect = D3DSWAPEFFECT_FLIP;
246 251 m_D3DPP.BackBufferCount = 2;
247 252
248 253 if(m_useD3D9Ex && (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 1 || osvi.dwMajorVersion > 6))

0 comments on commit 718b0ac

Please sign in to comment.
Something went wrong with that request. Please try again.