wined3d: Get rid of IWineD3DVolume::GetDesc().

This commit is contained in:
Henri Verbeet 2011-03-10 19:07:09 +01:00 committed by Alexandre Julliard
parent 2b18192e7a
commit 5f73f41f35
4 changed files with 11 additions and 12 deletions

View File

@ -190,11 +190,13 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(IDirect3DVolume8 *iface, D3DV
{ {
IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface);
struct wined3d_resource_desc wined3d_desc; struct wined3d_resource_desc wined3d_desc;
struct wined3d_resource *wined3d_resource;
TRACE("iface %p, desc %p.\n", iface, desc); TRACE("iface %p, desc %p.\n", iface, desc);
wined3d_mutex_lock(); wined3d_mutex_lock();
IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3d_desc); wined3d_resource = IWineD3DVolume_GetResource(This->wineD3DVolume);
wined3d_resource_get_desc(wined3d_resource, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);

View File

@ -180,13 +180,13 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(IDirect3DVolume9 *iface, D3DV
{ {
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
struct wined3d_resource_desc wined3d_desc; struct wined3d_resource_desc wined3d_desc;
struct wined3d_resource *wined3d_resource;
TRACE("iface %p, desc %p.\n", iface, desc); TRACE("iface %p, desc %p.\n", iface, desc);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_resource = IWineD3DVolume_GetResource(This->wineD3DVolume);
IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3d_desc); wined3d_resource_get_desc(wined3d_resource, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);

View File

@ -220,13 +220,11 @@ static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *ifa
return resource_get_type(&((IWineD3DVolumeImpl *)iface)->resource); return resource_get_type(&((IWineD3DVolumeImpl *)iface)->resource);
} }
static void WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, struct wined3d_resource_desc *desc) struct wined3d_resource * WINAPI IWineD3DVolumeImpl_GetResource(IWineD3DVolume *iface)
{ {
IWineD3DVolumeImpl *volume = (IWineD3DVolumeImpl *)iface; TRACE("iface %p.\n", iface);
TRACE("iface %p, desc %p.\n", iface, desc); return &((IWineD3DVolumeImpl *)iface)->resource;
wined3d_resource_get_desc(&volume->resource, desc);
} }
static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface, static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
@ -309,7 +307,7 @@ static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl =
IWineD3DVolumeImpl_PreLoad, IWineD3DVolumeImpl_PreLoad,
IWineD3DVolumeImpl_GetType, IWineD3DVolumeImpl_GetType,
/* IWineD3DVolume */ /* IWineD3DVolume */
IWineD3DVolumeImpl_GetDesc, IWineD3DVolumeImpl_GetResource,
IWineD3DVolumeImpl_Map, IWineD3DVolumeImpl_Map,
IWineD3DVolumeImpl_Unmap, IWineD3DVolumeImpl_Unmap,
}; };

View File

@ -2324,8 +2324,7 @@ interface IWineD3DSurface : IWineD3DResource
] ]
interface IWineD3DVolume : IWineD3DResource interface IWineD3DVolume : IWineD3DResource
{ {
void GetDesc( struct wined3d_resource *GetResource(
[out] struct wined3d_resource_desc *desc
); );
HRESULT Map( HRESULT Map(
[out] WINED3DLOCKED_BOX *locked_box, [out] WINED3DLOCKED_BOX *locked_box,