wined3d: Remove ResourceReleased() from the public device interface.

This commit is contained in:
Henri Verbeet 2009-05-29 09:13:21 +02:00 committed by Alexandre Julliard
parent d37472f27b
commit 5e0f541621
4 changed files with 8 additions and 16 deletions

View File

@ -7786,23 +7786,21 @@ static void IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3DResour
list_add_head(&This->resources, &((IWineD3DResourceImpl *) resource)->resource.resource_list_entry);
}
static void IWineD3DDeviceImpl_RemoveResource(IWineD3DDevice *iface, IWineD3DResource *resource){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
static void device_resource_remove(IWineD3DDeviceImpl *This, IWineD3DResource *resource)
{
TRACE("(%p) : Removing resource %p\n", This, resource);
list_remove(&((IWineD3DResourceImpl *) resource)->resource.resource_list_entry);
}
static void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IWineD3DResource *resource){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource)
{
WINED3DRESOURCETYPE type = IWineD3DResource_GetType(resource);
int counter;
TRACE("(%p) : resource %p\n", This, resource);
context_resource_released(iface, resource, type);
context_resource_released((IWineD3DDevice *)This, resource, type);
switch (type) {
/* TODO: check front and back buffers, rendertargets etc.. possibly swapchains? */
@ -7917,7 +7915,7 @@ static void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IW
/* Remove the resource from the resourceStore */
IWineD3DDeviceImpl_RemoveResource(iface, resource);
device_resource_remove(This, resource);
TRACE("Resource released\n");
@ -8089,7 +8087,6 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_UpdateSurface,
IWineD3DDeviceImpl_GetFrontBufferData,
/*** object tracking ***/
IWineD3DDeviceImpl_ResourceReleased,
IWineD3DDeviceImpl_EnumResources
};

View File

@ -96,10 +96,7 @@ void resource_cleanup(IWineD3DResource *iface)
This->resource.allocatedMemory = 0;
This->resource.heapMemory = 0;
if (This->resource.wineD3DDevice != NULL) {
IWineD3DDevice_ResourceReleased((IWineD3DDevice *)This->resource.wineD3DDevice, iface);
}/* NOTE: this is not really an error for system memory resources */
return;
if (This->resource.wineD3DDevice) device_resource_released(This->resource.wineD3DDevice, iface);
}
HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice** ppDevice)

View File

@ -1578,6 +1578,7 @@ struct IWineD3DDeviceImpl
extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl;
void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource);
void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup);
void device_stream_info_from_strided(IWineD3DDeviceImpl *This,

View File

@ -3468,9 +3468,6 @@ interface IWineD3DDevice : IWineD3DBase
[in] UINT swapchain_idx,
[in] IWineD3DSurface *dst_surface
);
void ResourceReleased(
[in] IWineD3DResource *resource
);
HRESULT EnumResources(
[in] D3DCB_ENUMRESOURCES callback,
[in] void *data