[PATCH 2/4] wined3d: Don't require container parents for IWineD3DDeviceParent methods to be COM objects.
Henri Verbeet
hverbeet at codeweavers.com
Mon Mar 7 14:45:25 CST 2011
---
dlls/d3d10core/device.c | 18 +++++++++---------
dlls/d3d8/device.c | 26 +++++++++++++-------------
dlls/d3d9/device.c | 28 ++++++++++++++--------------
dlls/ddraw/ddraw.c | 18 +++++++++---------
include/wine/wined3d.idl | 6 +++---
5 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index d092692..8fbd8c6 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -1320,7 +1320,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
{
struct d3d10_device *This = device_from_device_parent(iface);
@@ -1328,9 +1328,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
D3D10_TEXTURE2D_DESC desc;
HRESULT hr;
- FIXME("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+ FIXME("iface %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n"
"\tpool %#x, level %u, face %u, surface %p partial stub!\n",
- iface, superior, width, height, format, usage, pool, level, face, surface);
+ iface, container_parent, width, height, format, usage, pool, level, face, surface);
FIXME("Implement DXGI<->wined3d usage conversion\n");
@@ -1361,7 +1361,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
IWineD3DSurface **surface)
{
@@ -1370,9 +1370,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
D3D10_TEXTURE2D_DESC desc;
HRESULT hr;
- FIXME("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+ FIXME("iface %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, lockable %u, surface %p partial stub!\n",
- iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+ iface, container_parent, width, height, format, multisample_type, multisample_quality, lockable, surface);
FIXME("Implement DXGI<->wined3d usage conversion\n");
@@ -1444,13 +1444,13 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
{
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p.\n",
- iface, superior, width, height, depth, format, pool, usage, volume);
+ TRACE("iface %p, container_parent %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p.\n",
+ iface, container_parent, width, height, depth, format, pool, usage, volume);
hr = IWineD3DDevice_CreateVolume(device_from_device_parent(iface)->wined3d_device,
width, height, depth, usage, format, pool, NULL, &d3d10_subresource_parent_ops, volume);
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 8eadd15..b034b6a 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -2745,7 +2745,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
{
IDirect3DDevice8Impl *This = impl_from_IWineD3DDeviceParent(iface);
@@ -2753,9 +2753,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
BOOL lockable = TRUE;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n"
"\tpool %#x, level %u, face %u, surface %p\n",
- iface, superior, width, height, format, usage, pool, level, face, surface);
+ iface, container_parent, width, height, format, usage, pool, level, face, surface);
if (pool == WINED3DPOOL_DEFAULT && !(usage & WINED3DUSAGE_DYNAMIC)) lockable = FALSE;
@@ -2772,18 +2772,18 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
*surface = d3d_surface->wineD3DSurface;
IWineD3DSurface_AddRef(*surface);
- d3d_surface->container = superior;
+ d3d_surface->container = container_parent;
IUnknown_Release(d3d_surface->parentDevice);
d3d_surface->parentDevice = NULL;
IDirect3DSurface8_Release((IDirect3DSurface8 *)d3d_surface);
- d3d_surface->forwardReference = superior;
+ d3d_surface->forwardReference = container_parent;
return hr;
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
IWineD3DSurface **surface)
{
@@ -2791,9 +2791,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
IDirect3DSurface8Impl *d3d_surface;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, lockable %u, surface %p\n",
- iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+ iface, container_parent, width, height, format, multisample_type, multisample_quality, lockable, surface);
hr = IDirect3DDevice8_CreateRenderTarget(&This->IDirect3DDevice8_iface, width, height,
d3dformat_from_wined3dformat(format), multisample_type, lockable, (IDirect3DSurface8 **)&d3d_surface);
@@ -2844,15 +2844,15 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
{
IDirect3DDevice8Impl *This = impl_from_IWineD3DDeviceParent(iface);
IDirect3DVolume8Impl *object;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
- iface, superior, width, height, depth, format, pool, usage, volume);
+ TRACE("iface %p, container_parent %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
+ iface, container_parent, width, height, depth, format, pool, usage, volume);
/* Allocate the storage for the device */
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
@@ -2875,8 +2875,8 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
IWineD3DVolume_AddRef(*volume);
IDirect3DVolume8_Release(&object->IDirect3DVolume8_iface);
- object->container = superior;
- object->forwardReference = superior;
+ object->container = container_parent;
+ object->forwardReference = container_parent;
TRACE("(%p) Created volume %p\n", iface, object);
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 1ae2281..5236e74 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3029,7 +3029,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
{
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
@@ -3037,9 +3037,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
BOOL lockable = TRUE;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n"
"\tpool %#x, level %u, face %u, surface %p\n",
- iface, superior, width, height, format, usage, pool, level, face, surface);
+ iface, container_parent, width, height, format, usage, pool, level, face, surface);
if (pool == WINED3DPOOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC))
lockable = FALSE;
@@ -3056,18 +3056,18 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
*surface = d3d_surface->wineD3DSurface;
IWineD3DSurface_AddRef(*surface);
- d3d_surface->container = superior;
+ d3d_surface->container = container_parent;
IDirect3DDevice9Ex_Release(d3d_surface->parentDevice);
d3d_surface->parentDevice = NULL;
IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface);
- d3d_surface->forwardReference = superior;
+ d3d_surface->forwardReference = container_parent;
return hr;
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
IWineD3DSurface **surface)
{
@@ -3075,9 +3075,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
IDirect3DSurface9Impl *d3d_surface;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, lockable %u, surface %p\n",
- iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+ iface, container_parent, width, height, format, multisample_type, multisample_quality, lockable, surface);
hr = IDirect3DDevice9Impl_CreateRenderTarget((IDirect3DDevice9Ex *)This, width, height,
d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, lockable,
@@ -3091,7 +3091,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
*surface = d3d_surface->wineD3DSurface;
IWineD3DSurface_AddRef(*surface);
- d3d_surface->container = superior;
+ d3d_surface->container = container_parent;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface);
@@ -3129,15 +3129,15 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
{
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
IDirect3DVolume9Impl *object;
HRESULT hr;
- TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
- iface, superior, width, height, depth, format, pool, usage, volume);
+ TRACE("iface %p, container_parent %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
+ iface, container_parent, width, height, depth, format, pool, usage, volume);
/* Allocate the storage for the device */
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
@@ -3160,8 +3160,8 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
IWineD3DVolume_AddRef(*volume);
IDirect3DVolume9_Release((IDirect3DVolume9 *)object);
- object->container = superior;
- object->forwardReference = superior;
+ object->container = container_parent;
+ object->forwardReference = container_parent;
TRACE("(%p) Created volume %p\n", iface, object);
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index e96a379..e1d5c62 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -5724,7 +5724,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
{
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
@@ -5732,9 +5732,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
UINT i = 0;
DDSCAPS2 searchcaps = This->tex_root->surface_desc.ddsCaps;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n"
"\tpool %#x, level %u, face %u, surface %p\n",
- iface, superior, width, height, format, usage, pool, level, face, surface);
+ iface, container_parent, width, height, format, usage, pool, level, face, surface);
searchcaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES;
switch(face)
@@ -5815,7 +5815,7 @@ static HRESULT WINAPI findRenderTarget(IDirectDrawSurface7 *surface, DDSURFACEDE
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
IWineD3DSurface **surface)
{
@@ -5823,9 +5823,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
IDirectDrawSurfaceImpl *d3d_surface = This->d3d_target;
IDirectDrawSurfaceImpl *target = NULL;
- TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+ TRACE("iface %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, lockable %u, surface %p\n",
- iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+ iface, container_parent, width, height, format, multisample_type, multisample_quality, lockable, surface);
if (d3d_surface->isRenderTarget)
{
@@ -5903,11 +5903,11 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
- IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
+ void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
{
- TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
- iface, superior, width, height, depth, format, pool, usage, volume);
+ TRACE("iface %p, container_parent %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
+ iface, container_parent, width, height, depth, format, pool, usage, volume);
ERR("Not implemented!\n");
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 9d3952c..bfd1a52 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -2130,7 +2130,7 @@ interface IWineD3DDeviceParent : IUnknown
);
HRESULT CreateSurface(
- [in] IUnknown *superior,
+ [in] void *container_parent,
[in] UINT width,
[in] UINT height,
[in] enum wined3d_format_id format_id,
@@ -2142,7 +2142,7 @@ interface IWineD3DDeviceParent : IUnknown
);
HRESULT CreateRenderTarget(
- [in] IUnknown *superior,
+ [in] void *container_parent,
[in] UINT width,
[in] UINT height,
[in] enum wined3d_format_id format_id,
@@ -2163,7 +2163,7 @@ interface IWineD3DDeviceParent : IUnknown
);
HRESULT CreateVolume(
- [in] IUnknown *superior,
+ [in] void *container_parent,
[in] UINT width,
[in] UINT height,
[in] UINT depth,
--
1.7.3.4
More information about the wine-patches
mailing list