Commit 50de4cda authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

d3d9: Use the private store api for surfaces.

parent 6121393d
......@@ -143,52 +143,28 @@ static HRESULT WINAPI d3d9_surface_SetPrivateData(IDirect3DSurface9 *iface, REFG
const void *data, DWORD data_size, DWORD flags)
{
struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n",
iface, debugstr_guid(guid), data, data_size, flags);
wined3d_mutex_lock();
resource = wined3d_surface_get_resource(surface->wined3d_surface);
hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags);
wined3d_mutex_unlock();
return hr;
return d3d9_resource_set_private_data(&surface->resource, guid, data, data_size, flags);
}
static HRESULT WINAPI d3d9_surface_GetPrivateData(IDirect3DSurface9 *iface, REFGUID guid,
void *data, DWORD *data_size)
{
struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %p.\n",
iface, debugstr_guid(guid), data, data_size);
wined3d_mutex_lock();
resource = wined3d_surface_get_resource(surface->wined3d_surface);
hr = wined3d_resource_get_private_data(resource, guid, data, data_size);
wined3d_mutex_unlock();
return hr;
return d3d9_resource_get_private_data(&surface->resource, guid, data, data_size);
}
static HRESULT WINAPI d3d9_surface_FreePrivateData(IDirect3DSurface9 *iface, REFGUID guid)
{
struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid));
wined3d_mutex_lock();
resource = wined3d_surface_get_resource(surface->wined3d_surface);
hr = wined3d_resource_free_private_data(resource, guid);
wined3d_mutex_unlock();
return hr;
return d3d9_resource_free_private_data(&surface->resource, guid);
}
static DWORD WINAPI d3d9_surface_SetPriority(IDirect3DSurface9 *iface, DWORD priority)
......
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