Commit 7e67bced authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass an IWineD3DResourceImpl pointer to resource_set_priority().

parent 2d9748b1
...@@ -780,7 +780,7 @@ static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, R ...@@ -780,7 +780,7 @@ static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, R
static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority) static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority)
{ {
return resource_set_priority((IWineD3DResource *)iface, priority); return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface) static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface)
......
...@@ -229,8 +229,9 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTextur ...@@ -229,8 +229,9 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTextur
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
} }
static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD PriorityNew) { static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD priority)
return resource_set_priority((IWineD3DResource *)iface, PriorityNew); {
return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
static DWORD WINAPI IWineD3DCubeTextureImpl_GetPriority(IWineD3DCubeTexture *iface) static DWORD WINAPI IWineD3DCubeTextureImpl_GetPriority(IWineD3DCubeTexture *iface)
......
...@@ -250,13 +250,12 @@ HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUI ...@@ -250,13 +250,12 @@ HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUI
return WINED3D_OK; return WINED3D_OK;
} }
DWORD resource_set_priority(IWineD3DResource *iface, DWORD PriorityNew) DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority)
{ {
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; DWORD prev = resource->resource.priority;
DWORD PriorityOld = This->resource.priority; resource->resource.priority = priority;
This->resource.priority = PriorityNew; TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev);
TRACE("(%p) : new priority %d, returning old priority %d\n", This, PriorityNew, PriorityOld ); return prev;
return PriorityOld;
} }
DWORD resource_get_priority(struct IWineD3DResourceImpl *resource) DWORD resource_get_priority(struct IWineD3DResourceImpl *resource)
......
...@@ -128,8 +128,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, R ...@@ -128,8 +128,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, R
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
} }
DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) { DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD priority)
return resource_set_priority((IWineD3DResource *)iface, PriorityNew); {
return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface)
......
...@@ -254,8 +254,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface ...@@ -254,8 +254,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
} }
static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD PriorityNew) { static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD priority)
return resource_set_priority((IWineD3DResource *)iface, PriorityNew); {
return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
static DWORD WINAPI IWineD3DTextureImpl_GetPriority(IWineD3DTexture *iface) static DWORD WINAPI IWineD3DTextureImpl_GetPriority(IWineD3DTexture *iface)
......
...@@ -167,8 +167,9 @@ static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface, ...@@ -167,8 +167,9 @@ static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface,
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
} }
static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD PriorityNew) { static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD priority)
return resource_set_priority((IWineD3DResource *)iface, PriorityNew); {
return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
static DWORD WINAPI IWineD3DVolumeImpl_GetPriority(IWineD3DVolume *iface) static DWORD WINAPI IWineD3DVolumeImpl_GetPriority(IWineD3DVolume *iface)
......
...@@ -174,8 +174,9 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTe ...@@ -174,8 +174,9 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTe
return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD PriorityNew) { static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD priority)
return resource_set_priority((IWineD3DResource *)iface, PriorityNew); {
return resource_set_priority((IWineD3DResourceImpl *)iface, priority);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture *iface) static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture *iface)
......
...@@ -1837,7 +1837,7 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE ...@@ -1837,7 +1837,7 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE
IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format, IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN;
DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN; DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority) DECLSPEC_HIDDEN;
HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid, HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid,
const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN; const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN;
void resource_unload(IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN; void resource_unload(IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment