dxgi: Avoid locking wined3d mutex around wined3d_swapchain_incref().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-11-29 14:33:44 +01:00 committed by Alexandre Julliard
parent bcbfcd3869
commit aaba7fdd00
1 changed files with 1 additions and 5 deletions

View File

@ -143,14 +143,10 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain1 *iface)
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedIncrement(&swapchain->refcount);
TRACE("%p increasing refcount to %u\n", swapchain, refcount);
TRACE("%p increasing refcount to %u.\n", swapchain, refcount);
if (refcount == 1)
{
wined3d_mutex_lock();
wined3d_swapchain_incref(swapchain->wined3d_swapchain);
wined3d_mutex_unlock();
}
return refcount;
}