Module: wine Branch: master Commit: 5cd719b8671eb5a3e5104216fac3836ef8ab8a30 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5cd719b8671eb5a3e5104216fa... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Apr 14 12:20:24 2016 +0200 dxgi: Do not store IDXGIFactory in IDXGIDevice. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dxgi/device.c | 3 --- dlls/dxgi/dxgi_private.h | 1 - dlls/dxgi/tests/device.c | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index f5de698..2cf9aa7 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -86,7 +86,6 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface) wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); IDXGIAdapter1_Release(device->adapter); - IDXGIFactory1_Release(device->factory); wined3d_private_store_cleanup(&device->private_store); HeapFree(GetProcessHeap(), 0, device); } @@ -454,8 +453,6 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l } wined3d_mutex_unlock(); - device->factory = &dxgi_factory->IDXGIFactory1_iface; - IDXGIFactory1_AddRef(device->factory); device->adapter = &dxgi_adapter->IDXGIAdapter1_iface; IDXGIAdapter1_AddRef(device->adapter); diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 5a4d43e..aca17ba 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -116,7 +116,6 @@ struct dxgi_device LONG refcount; struct wined3d_private_store private_store; struct wined3d_device *wined3d_device; - IDXGIFactory1 *factory; IDXGIAdapter1 *adapter; }; diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index 1baea71..ab294f8 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -467,7 +467,7 @@ static void test_create_swapchain(void) expected_refcount = get_refcount((IUnknown *)adapter); refcount = get_refcount((IUnknown *)factory); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); refcount = get_refcount((IUnknown *)device); ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); @@ -499,7 +499,7 @@ static void test_create_swapchain(void) IDXGISwapChain_Release(swapchain); refcount = get_refcount((IUnknown *)factory); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); for (i = 0; i < sizeof(refresh_list)/sizeof(refresh_list[0]); i++) {