From 89e6a607322eb28195ff72c5ab563a2c0277860a Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 16 Aug 2010 20:00:22 +0200 Subject: [PATCH] wined3d: Remove SetContainer() from the public IWineD3DVolume interface. --- dlls/wined3d/volume.c | 21 +++++++-------------- dlls/wined3d/volumetexture.c | 8 ++++---- dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.idl | 3 --- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index c22c263704b..0d9b82d4fd3 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -93,6 +93,13 @@ void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) } } +void volume_set_container(IWineD3DVolumeImpl *volume, IWineD3DBase *container) +{ + TRACE("volume %p, container %p.\n", volume, container); + + volume->container = container; +} + /* ******************************************* IWineD3DVolume IUnknown parts follow ******************************************* */ @@ -301,19 +308,6 @@ static HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) { /* Internal use functions follow : */ -static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBase* container) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - - TRACE("This %p, container %p\n", This, container); - - /* We can't keep a reference to the container, since the container already keeps a reference to us. */ - - TRACE("Setting container to %p from %p\n", container, This->container); - This->container = container; - - return WINED3D_OK; -} - /* Context activation is done by the caller. */ static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int gl_level, BOOL srgb_mode) { @@ -382,7 +376,6 @@ static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl = IWineD3DVolumeImpl_UnlockBox, /* Internal interface */ IWineD3DVolumeImpl_LoadTexture, - IWineD3DVolumeImpl_SetContainer }; HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width, diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 9fccb2b8936..648f3812a50 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -85,13 +85,13 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This) for (i = 0; i < This->baseTexture.level_count; ++i) { - IWineD3DVolume *volume = (IWineD3DVolume *)This->baseTexture.sub_resources[i]; + IWineD3DVolumeImpl *volume = (IWineD3DVolumeImpl *)This->baseTexture.sub_resources[i]; if (volume) { /* Cleanup the container. */ - IWineD3DVolume_SetContainer(volume, NULL); - IWineD3DVolume_Release(volume); + volume_set_container(volume, NULL); + IWineD3DVolume_Release((IWineD3DVolume *)volume); } } basetexture_cleanup((IWineD3DBaseTexture *)This); @@ -466,7 +466,7 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT } /* Set its container to this texture. */ - IWineD3DVolume_SetContainer(volume, (IWineD3DBase *)texture); + volume_set_container((IWineD3DVolumeImpl *)volume, (IWineD3DBase *)texture); texture->baseTexture.sub_resources[i] = (IWineD3DResourceImpl *)volume; /* Calculate the next mipmap level. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e21685e3ce1..7c5dded26e1 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1935,6 +1935,7 @@ void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DE HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width, UINT height, UINT depth, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +void volume_set_container(IWineD3DVolumeImpl *volume, IWineD3DBase *container) DECLSPEC_HIDDEN; /***************************************************************************** * IWineD3DVolumeTexture implementation structure (extends IWineD3DBaseTextureImpl) diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index e15ea4d2741..1a439b61474 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2522,9 +2522,6 @@ interface IWineD3DVolume : IWineD3DResource [in] int gl_level, [in] BOOL srgb_mode ); - HRESULT SetContainer( - [in] IWineD3DBase *container - ); } [