wined3d: Introduce wined3d_texture_get_dc().
Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c43b290fa5
commit
a2f2d238d4
|
@ -297,7 +297,7 @@ static HRESULT WINAPI d3d9_surface_GetDC(IDirect3DSurface9 *iface, HDC *dc)
|
|||
}
|
||||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_surface_getdc(surface->wined3d_surface, dc);
|
||||
hr = wined3d_texture_get_dc(surface->wined3d_texture, surface->sub_resource_idx, dc);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -1540,3 +1540,21 @@ HRESULT CDECL wined3d_texture_unmap(struct wined3d_texture *texture, unsigned in
|
|||
|
||||
return texture->texture_ops->texture_sub_resource_unmap(sub_resource);
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
|
||||
{
|
||||
struct wined3d_resource *sub_resource;
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
if (!(sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx)))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (sub_resource->type != WINED3D_RTYPE_SURFACE)
|
||||
{
|
||||
WARN("Not supported on %s resources.\n", debug_d3dresourcetype(texture->resource.type));
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
return wined3d_surface_getdc(surface_from_resource(sub_resource), dc);
|
||||
}
|
||||
|
|
|
@ -262,6 +262,7 @@
|
|||
@ cdecl wined3d_texture_decref(ptr)
|
||||
@ cdecl wined3d_texture_generate_mipmaps(ptr)
|
||||
@ cdecl wined3d_texture_get_autogen_filter_type(ptr)
|
||||
@ cdecl wined3d_texture_get_dc(ptr long ptr)
|
||||
@ cdecl wined3d_texture_get_level_count(ptr)
|
||||
@ cdecl wined3d_texture_get_lod(ptr)
|
||||
@ cdecl wined3d_texture_get_parent(ptr)
|
||||
|
|
|
@ -2537,6 +2537,7 @@ HRESULT __cdecl wined3d_texture_create(struct wined3d_device *device, const stru
|
|||
ULONG __cdecl wined3d_texture_decref(struct wined3d_texture *texture);
|
||||
void __cdecl wined3d_texture_generate_mipmaps(struct wined3d_texture *texture);
|
||||
enum wined3d_texture_filter_type __cdecl wined3d_texture_get_autogen_filter_type(const struct wined3d_texture *texture);
|
||||
HRESULT __cdecl wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc);
|
||||
DWORD __cdecl wined3d_texture_get_level_count(const struct wined3d_texture *texture);
|
||||
DWORD __cdecl wined3d_texture_get_lod(const struct wined3d_texture *texture);
|
||||
void * __cdecl wined3d_texture_get_parent(const struct wined3d_texture *texture);
|
||||
|
|
Loading…
Reference in New Issue