mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 04:10:04 +00:00
wined3d: Pass an IWineD3DResourceImpl pointer to resource_free_private_data().
This commit is contained in:
parent
134137cdb4
commit
a97ae0db6a
@ -775,7 +775,7 @@ static HRESULT STDMETHODCALLTYPE buffer_GetPrivateData(IWineD3DBuffer *iface,
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, REFGUID guid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResource *)iface, guid);
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, guid);
|
||||
}
|
||||
|
||||
static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority)
|
||||
|
@ -222,8 +222,9 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_GetPrivateData(IWineD3DCubeTexture
|
||||
return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTexture *iface, REFGUID refguid) {
|
||||
return resource_free_private_data((IWineD3DResource *)iface, refguid);
|
||||
static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTexture *iface, REFGUID refguid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
|
||||
}
|
||||
|
||||
static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD PriorityNew) {
|
||||
|
@ -110,7 +110,7 @@ void resource_cleanup(struct IWineD3DResourceImpl *resource)
|
||||
LIST_FOR_EACH_SAFE(e1, e2, &resource->resource.privateData)
|
||||
{
|
||||
data = LIST_ENTRY(e1, struct private_data, entry);
|
||||
hr = resource_free_private_data((IWineD3DResource *)resource, &data->tag);
|
||||
hr = resource_free_private_data(resource, &data->tag);
|
||||
if (FAILED(hr))
|
||||
ERR("Failed to free private data when destroying resource %p, hr = %#x.\n", resource, hr);
|
||||
}
|
||||
@ -156,7 +156,7 @@ HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID refguid,
|
||||
TRACE("iface %p, riid %s, data %p, data_size %u, flags %#x.\n",
|
||||
iface, debugstr_guid(refguid), pData, SizeOfData, flags);
|
||||
|
||||
resource_free_private_data(iface, refguid);
|
||||
resource_free_private_data(This, refguid);
|
||||
|
||||
data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data));
|
||||
if (!data) return E_OUTOFMEMORY;
|
||||
@ -223,13 +223,13 @@ HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID refguid, void
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID refguid)
|
||||
HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid)
|
||||
{
|
||||
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
||||
struct private_data *data;
|
||||
|
||||
TRACE("(%p) : %s\n", This, debugstr_guid(refguid));
|
||||
data = resource_find_private_data(This, refguid);
|
||||
TRACE("resource %p, guid %s.\n", resource, debugstr_guid(guid));
|
||||
|
||||
data = resource_find_private_data(resource, guid);
|
||||
if (!data) return WINED3DERR_NOTFOUND;
|
||||
|
||||
if (data->flags & WINED3DSPD_IUNKNOWN)
|
||||
|
@ -121,8 +121,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface, RE
|
||||
return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) {
|
||||
return resource_free_private_data((IWineD3DResource *)iface, refguid);
|
||||
HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) {
|
||||
|
@ -247,8 +247,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_GetPrivateData(IWineD3DTexture *iface,
|
||||
return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface, REFGUID refguid) {
|
||||
return resource_free_private_data((IWineD3DResource *)iface, refguid);
|
||||
static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface, REFGUID refguid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
|
||||
}
|
||||
|
||||
static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD PriorityNew) {
|
||||
|
@ -160,8 +160,9 @@ static HRESULT WINAPI IWineD3DVolumeImpl_GetPrivateData(IWineD3DVolume *iface, R
|
||||
return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface, REFGUID refguid) {
|
||||
return resource_free_private_data((IWineD3DResource *)iface, refguid);
|
||||
static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface, REFGUID refguid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
|
||||
}
|
||||
|
||||
static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD PriorityNew) {
|
||||
|
@ -167,8 +167,9 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DVolumeTex
|
||||
return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid) {
|
||||
return resource_free_private_data((IWineD3DResource *)iface, refguid);
|
||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid)
|
||||
{
|
||||
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
|
||||
}
|
||||
|
||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD PriorityNew) {
|
||||
|
@ -1829,7 +1829,7 @@ typedef struct IWineD3DResourceImpl
|
||||
} IWineD3DResourceImpl;
|
||||
|
||||
void resource_cleanup(struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid) DECLSPEC_HIDDEN;
|
||||
DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid,
|
||||
void *data, DWORD *data_size) DECLSPEC_HIDDEN;
|
||||
|
Loading…
Reference in New Issue
Block a user