[PATCH v2 4/7] dxgi: Do not store IDXGIFactory in IDXGIDevice.

Józef Kucia jkucia at codeweavers.com
Thu Apr 14 05:20:24 CDT 2016


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
Version 2: Fix the subject.

This supersedes patch 121214.
---
 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++)
     {
-- 
2.4.10




More information about the wine-patches mailing list