dxgi: Rename dxgi_swapchain to d3d11_swapchain.

We will have more than one implementation of IDXGISwapChain.

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-05-28 14:40:25 +02:00 committed by Alexandre Julliard
parent 47dea5ba8f
commit eae33d5595
3 changed files with 99 additions and 99 deletions

View File

@ -327,7 +327,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
if (!(object = heap_alloc_zero(sizeof(*object))))
{
ERR("Failed to allocate DXGI surface object memory\n");
ERR("Failed to allocate DXGI surface object memory.\n");
return E_OUTOFMEMORY;
}
@ -338,7 +338,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
return hr;
}
TRACE("Created IDXGISurface %p\n", object);
TRACE("Created IDXGISurface %p.\n", object);
*surface = outer ? &object->IUnknown_iface : (IUnknown *)&object->IDXGISurface1_iface;
return S_OK;
@ -348,7 +348,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_swapchain(IWineDXGIDevice *i
struct wined3d_swapchain_desc *desc, BOOL implicit, struct wined3d_swapchain **wined3d_swapchain)
{
struct dxgi_device *device = impl_from_IWineDXGIDevice(iface);
struct dxgi_swapchain *object;
struct d3d11_swapchain *object;
HRESULT hr;
TRACE("iface %p, desc %p, wined3d_swapchain %p.\n",
@ -360,7 +360,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_swapchain(IWineDXGIDevice *i
return E_OUTOFMEMORY;
}
if (FAILED(hr = dxgi_swapchain_init(object, device, desc, implicit)))
if (FAILED(hr = d3d11_swapchain_init(object, device, desc, implicit)))
{
WARN("Failed to initialize swapchain, hr %#x.\n", hr);
heap_free(object);

View File

@ -160,7 +160,7 @@ HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal,
struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface) DECLSPEC_HIDDEN;
/* IDXGISwapChain */
struct dxgi_swapchain
struct d3d11_swapchain
{
IDXGISwapChain1 IDXGISwapChain1_iface;
LONG refcount;
@ -173,7 +173,7 @@ struct dxgi_swapchain
IDXGIOutput *target;
};
HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device,
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device,
struct wined3d_swapchain_desc *desc, BOOL implicit) DECLSPEC_HIDDEN;
/* IDXGISurface */

View File

@ -24,14 +24,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
static inline struct dxgi_swapchain *impl_from_IDXGISwapChain1(IDXGISwapChain1 *iface)
static inline struct d3d11_swapchain *d3d11_swapchain_from_IDXGISwapChain1(IDXGISwapChain1 *iface)
{
return CONTAINING_RECORD(iface, struct dxgi_swapchain, IDXGISwapChain1_iface);
return CONTAINING_RECORD(iface, struct d3d11_swapchain, IDXGISwapChain1_iface);
}
/* IUnknown methods */
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_QueryInterface(IDXGISwapChain1 *iface, REFIID riid, void **object)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_QueryInterface(IDXGISwapChain1 *iface, REFIID riid, void **object)
{
TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
@ -52,26 +52,26 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_QueryInterface(IDXGISwapChain1 *
return E_NOINTERFACE;
}
static ULONG STDMETHODCALLTYPE dxgi_swapchain_AddRef(IDXGISwapChain1 *iface)
static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain1 *iface)
{
struct dxgi_swapchain *This = impl_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedIncrement(&This->refcount);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedIncrement(&swapchain->refcount);
TRACE("%p increasing refcount to %u\n", This, refcount);
TRACE("%p increasing refcount to %u\n", swapchain, refcount);
if (refcount == 1)
{
wined3d_mutex_lock();
wined3d_swapchain_incref(This->wined3d_swapchain);
wined3d_swapchain_incref(swapchain->wined3d_swapchain);
wined3d_mutex_unlock();
}
return refcount;
}
static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain1 *iface)
static ULONG STDMETHODCALLTYPE d3d11_swapchain_Release(IDXGISwapChain1 *iface)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedDecrement(&swapchain->refcount);
TRACE("%p decreasing refcount to %u.\n", swapchain, refcount);
@ -98,39 +98,39 @@ static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain1 *iface)
/* IDXGIObject methods */
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetPrivateData(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetPrivateData(IDXGISwapChain1 *iface,
REFGUID guid, UINT data_size, const void *data)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_set_private_data(&swapchain->private_store, guid, data_size, data);
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetPrivateDataInterface(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetPrivateDataInterface(IDXGISwapChain1 *iface,
REFGUID guid, const IUnknown *object)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, guid %s, object %p.\n", iface, debugstr_guid(guid), object);
return dxgi_set_private_data_interface(&swapchain->private_store, guid, object);
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetPrivateData(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetPrivateData(IDXGISwapChain1 *iface,
REFGUID guid, UINT *data_size, void *data)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_get_private_data(&swapchain->private_store, guid, data_size, data);
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetParent(IDXGISwapChain1 *iface, REFIID riid, void **parent)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetParent(IDXGISwapChain1 *iface, REFIID riid, void **parent)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, riid %s, parent %p.\n", iface, debugstr_guid(riid), parent);
@ -146,9 +146,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetParent(IDXGISwapChain1 *iface
/* IDXGIDeviceSubObject methods */
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDevice(IDXGISwapChain1 *iface, REFIID riid, void **device)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDevice(IDXGISwapChain1 *iface, REFIID riid, void **device)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, riid %s, device %p.\n", iface, debugstr_guid(riid), device);
@ -164,19 +164,19 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDevice(IDXGISwapChain1 *iface
/* IDXGISwapChain1 methods */
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain1 *iface, UINT sync_interval, UINT flags)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_Present(IDXGISwapChain1 *iface, UINT sync_interval, UINT flags)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, sync_interval %u, flags %#x.\n", iface, sync_interval, flags);
return IDXGISwapChain1_Present1(&swapchain->IDXGISwapChain1_iface, sync_interval, flags, NULL);
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBuffer(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetBuffer(IDXGISwapChain1 *iface,
UINT buffer_idx, REFIID riid, void **surface)
{
struct dxgi_swapchain *This = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_texture *texture;
IUnknown *parent;
HRESULT hr;
@ -186,7 +186,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBuffer(IDXGISwapChain1 *iface
wined3d_mutex_lock();
if (!(texture = wined3d_swapchain_get_back_buffer(This->wined3d_swapchain, buffer_idx)))
if (!(texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain, buffer_idx)))
{
wined3d_mutex_unlock();
return DXGI_ERROR_INVALID_CALL;
@ -199,10 +199,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBuffer(IDXGISwapChain1 *iface
return hr;
}
static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH dxgi_swapchain_SetFullscreenState(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreenState(IDXGISwapChain1 *iface,
BOOL fullscreen, IDXGIOutput *target)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc swapchain_desc;
HRESULT hr;
@ -248,10 +248,10 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH dxgi_swapchain_SetFullscreenS
return hr;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenState(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenState(IDXGISwapChain1 *iface,
BOOL *fullscreen, IDXGIOutput **target)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
TRACE("iface %p, fullscreen %p, target %p.\n", iface, fullscreen, target);
@ -268,9 +268,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenState(IDXGISwapChai
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc(IDXGISwapChain1 *iface, DXGI_SWAP_CHAIN_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc(IDXGISwapChain1 *iface, DXGI_SWAP_CHAIN_DESC *desc)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc wined3d_desc;
TRACE("iface %p, desc %p.\n", iface, desc);
@ -306,10 +306,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc(IDXGISwapChain1 *iface,
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeBuffers(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeBuffers(IDXGISwapChain1 *iface,
UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc wined3d_desc;
struct wined3d_texture *texture;
IUnknown *parent;
@ -344,10 +344,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeBuffers(IDXGISwapChain1 *i
return hr;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeTarget(IDXGISwapChain1 *iface,
const DXGI_MODE_DESC *target_mode_desc)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_display_mode mode;
HRESULT hr;
@ -373,9 +373,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain1 *if
return hr;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapChain1 *iface, IDXGIOutput **output)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetContainingOutput(IDXGISwapChain1 *iface, IDXGIOutput **output)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
IDXGIAdapter *adapter;
IDXGIDevice *device;
HRESULT hr;
@ -388,7 +388,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapCha
return S_OK;
}
if (FAILED(hr = dxgi_swapchain_GetDevice(iface, &IID_IDXGIDevice, (void **)&device)))
if (FAILED(hr = d3d11_swapchain_GetDevice(iface, &IID_IDXGIDevice, (void **)&device)))
return hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
@ -410,7 +410,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapCha
return hr;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFrameStatistics(IDXGISwapChain1 *iface,
DXGI_FRAME_STATISTICS *stats)
{
FIXME("iface %p, stats %p stub!\n", iface, stats);
@ -418,7 +418,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChai
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetLastPresentCount(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetLastPresentCount(IDXGISwapChain1 *iface,
UINT *last_present_count)
{
FIXME("iface %p, last_present_count %p stub!\n", iface, last_present_count);
@ -428,9 +428,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetLastPresentCount(IDXGISwapCha
/* IDXGISwapChain1 methods */
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc1(IDXGISwapChain1 *iface, DXGI_SWAP_CHAIN_DESC1 *desc)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc1(IDXGISwapChain1 *iface, DXGI_SWAP_CHAIN_DESC1 *desc)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc wined3d_desc;
TRACE("iface %p, desc %p.\n", iface, desc);
@ -463,10 +463,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc1(IDXGISwapChain1 *iface,
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenDesc(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenDesc(IDXGISwapChain1 *iface,
DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc wined3d_desc;
TRACE("iface %p, desc %p.\n", iface, desc);
@ -492,9 +492,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenDesc(IDXGISwapChain
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetHwnd(IDXGISwapChain1 *iface, HWND *hwnd)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetHwnd(IDXGISwapChain1 *iface, HWND *hwnd)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
struct wined3d_swapchain_desc wined3d_desc;
TRACE("iface %p, hwnd %p.\n", iface, hwnd);
@ -513,7 +513,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetHwnd(IDXGISwapChain1 *iface,
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetCoreWindow(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetCoreWindow(IDXGISwapChain1 *iface,
REFIID iid, void **core_window)
{
FIXME("iface %p, iid %s, core_window %p stub!\n", iface, debugstr_guid(iid), core_window);
@ -524,10 +524,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetCoreWindow(IDXGISwapChain1 *i
return DXGI_ERROR_INVALID_CALL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present1(IDXGISwapChain1 *iface,
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_Present1(IDXGISwapChain1 *iface,
UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *present_parameters)
{
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
HRESULT hr;
TRACE("iface %p, sync_interval %u, flags %#x, present_parameters %p.\n",
@ -557,14 +557,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present1(IDXGISwapChain1 *iface,
return hr;
}
static BOOL STDMETHODCALLTYPE dxgi_swapchain_IsTemporaryMonoSupported(IDXGISwapChain1 *iface)
static BOOL STDMETHODCALLTYPE d3d11_swapchain_IsTemporaryMonoSupported(IDXGISwapChain1 *iface)
{
FIXME("iface %p stub!\n", iface);
return FALSE;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetRestrictToOutput(IDXGISwapChain1 *iface, IDXGIOutput **output)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRestrictToOutput(IDXGISwapChain1 *iface, IDXGIOutput **output)
{
FIXME("iface %p, output %p stub!\n", iface, output);
@ -578,91 +578,91 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetRestrictToOutput(IDXGISwapCha
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetBackgroundColor(IDXGISwapChain1 *iface, const DXGI_RGBA *color)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetBackgroundColor(IDXGISwapChain1 *iface, const DXGI_RGBA *color)
{
FIXME("iface %p, color %p stub!\n", iface, color);
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBackgroundColor(IDXGISwapChain1 *iface, DXGI_RGBA *color)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetBackgroundColor(IDXGISwapChain1 *iface, DXGI_RGBA *color)
{
FIXME("iface %p, color %p stub!\n", iface, color);
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetRotation(IDXGISwapChain1 *iface, DXGI_MODE_ROTATION rotation)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetRotation(IDXGISwapChain1 *iface, DXGI_MODE_ROTATION rotation)
{
FIXME("iface %p, rotation %#x stub!\n", iface, rotation);
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetRotation(IDXGISwapChain1 *iface, DXGI_MODE_ROTATION *rotation)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRotation(IDXGISwapChain1 *iface, DXGI_MODE_ROTATION *rotation)
{
FIXME("iface %p, rotation %p stub!\n", iface, rotation);
return E_NOTIMPL;
}
static const struct IDXGISwapChain1Vtbl dxgi_swapchain_vtbl =
static const struct IDXGISwapChain1Vtbl d3d11_swapchain_vtbl =
{
/* IUnknown methods */
dxgi_swapchain_QueryInterface,
dxgi_swapchain_AddRef,
dxgi_swapchain_Release,
d3d11_swapchain_QueryInterface,
d3d11_swapchain_AddRef,
d3d11_swapchain_Release,
/* IDXGIObject methods */
dxgi_swapchain_SetPrivateData,
dxgi_swapchain_SetPrivateDataInterface,
dxgi_swapchain_GetPrivateData,
dxgi_swapchain_GetParent,
d3d11_swapchain_SetPrivateData,
d3d11_swapchain_SetPrivateDataInterface,
d3d11_swapchain_GetPrivateData,
d3d11_swapchain_GetParent,
/* IDXGIDeviceSubObject methods */
dxgi_swapchain_GetDevice,
d3d11_swapchain_GetDevice,
/* IDXGISwapChain methods */
dxgi_swapchain_Present,
dxgi_swapchain_GetBuffer,
dxgi_swapchain_SetFullscreenState,
dxgi_swapchain_GetFullscreenState,
dxgi_swapchain_GetDesc,
dxgi_swapchain_ResizeBuffers,
dxgi_swapchain_ResizeTarget,
dxgi_swapchain_GetContainingOutput,
dxgi_swapchain_GetFrameStatistics,
dxgi_swapchain_GetLastPresentCount,
d3d11_swapchain_Present,
d3d11_swapchain_GetBuffer,
d3d11_swapchain_SetFullscreenState,
d3d11_swapchain_GetFullscreenState,
d3d11_swapchain_GetDesc,
d3d11_swapchain_ResizeBuffers,
d3d11_swapchain_ResizeTarget,
d3d11_swapchain_GetContainingOutput,
d3d11_swapchain_GetFrameStatistics,
d3d11_swapchain_GetLastPresentCount,
/* IDXGISwapChain1 methods */
dxgi_swapchain_GetDesc1,
dxgi_swapchain_GetFullscreenDesc,
dxgi_swapchain_GetHwnd,
dxgi_swapchain_GetCoreWindow,
dxgi_swapchain_Present1,
dxgi_swapchain_IsTemporaryMonoSupported,
dxgi_swapchain_GetRestrictToOutput,
dxgi_swapchain_SetBackgroundColor,
dxgi_swapchain_GetBackgroundColor,
dxgi_swapchain_SetRotation,
dxgi_swapchain_GetRotation,
d3d11_swapchain_GetDesc1,
d3d11_swapchain_GetFullscreenDesc,
d3d11_swapchain_GetHwnd,
d3d11_swapchain_GetCoreWindow,
d3d11_swapchain_Present1,
d3d11_swapchain_IsTemporaryMonoSupported,
d3d11_swapchain_GetRestrictToOutput,
d3d11_swapchain_SetBackgroundColor,
d3d11_swapchain_GetBackgroundColor,
d3d11_swapchain_SetRotation,
d3d11_swapchain_GetRotation,
};
static void STDMETHODCALLTYPE dxgi_swapchain_wined3d_object_released(void *parent)
static void STDMETHODCALLTYPE d3d11_swapchain_wined3d_object_released(void *parent)
{
struct dxgi_swapchain *swapchain = parent;
struct d3d11_swapchain *swapchain = parent;
wined3d_private_store_cleanup(&swapchain->private_store);
heap_free(parent);
}
static const struct wined3d_parent_ops dxgi_swapchain_wined3d_parent_ops =
static const struct wined3d_parent_ops d3d11_swapchain_wined3d_parent_ops =
{
dxgi_swapchain_wined3d_object_released,
d3d11_swapchain_wined3d_object_released,
};
HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device,
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device,
struct wined3d_swapchain_desc *desc, BOOL implicit)
{
HRESULT hr;
/**
/*
* A reference to the implicit swapchain is held by the wined3d device.
* In order to avoid circular references we do not keep a reference
* to the device in the implicit swapchain.
@ -683,7 +683,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
swapchain->factory = NULL;
}
swapchain->IDXGISwapChain1_iface.lpVtbl = &dxgi_swapchain_vtbl;
swapchain->IDXGISwapChain1_iface.lpVtbl = &d3d11_swapchain_vtbl;
swapchain->refcount = 1;
wined3d_mutex_lock();
wined3d_private_store_init(&swapchain->private_store);
@ -694,7 +694,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
swapchain->fullscreen = !desc->windowed;
desc->windowed = TRUE;
if (FAILED(hr = wined3d_swapchain_create(device->wined3d_device, desc, swapchain,
&dxgi_swapchain_wined3d_parent_ops, &swapchain->wined3d_swapchain)))
&d3d11_swapchain_wined3d_parent_ops, &swapchain->wined3d_swapchain)))
{
WARN("Failed to create wined3d swapchain, hr %#x.\n", hr);
goto cleanup;