From 5cd719b8671eb5a3e5104216fac3836ef8ab8a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 14 Apr 2016 12:20:24 +0200 Subject: [PATCH] dxgi: Do not store IDXGIFactory in IDXGIDevice. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 f5de6980ad0..2cf9aa7581a 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 5a4d43ef1a6..aca17bab5df 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 1baea7103e2..ab294f81466 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++) {