ddraw: Use wined3d_texture_blt() in ddraw_surface_update_frontbuffer().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-01-29 18:48:54 +01:00 committed by Alexandre Julliard
parent 1a812eb666
commit 257ee8cc6e
6 changed files with 4 additions and 11 deletions

View File

@ -4822,7 +4822,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return hr;
}
ddraw->wined3d_frontbuffer = wined3d_surface_from_resource(wined3d_texture_get_sub_resource(*texture, 0));
ddraw->wined3d_frontbuffer = *texture;
return hr;
}

View File

@ -92,7 +92,7 @@ struct ddraw
struct ddraw_surface *primary;
RECT primary_lock;
struct wined3d_surface *wined3d_frontbuffer;
struct wined3d_texture *wined3d_frontbuffer;
struct wined3d_swapchain *wined3d_swapchain;
HWND swapchain_window;

View File

@ -69,8 +69,8 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
if (read)
return DD_OK;
return wined3d_surface_blt(surface->ddraw->wined3d_frontbuffer, rect,
surface->wined3d_surface, rect, 0, NULL, WINED3D_TEXF_POINT);
return wined3d_texture_blt(surface->ddraw->wined3d_frontbuffer, 0, rect,
surface->wined3d_texture, surface->sub_resource_idx, rect, 0, NULL, WINED3D_TEXF_POINT);
}
if (FAILED(hr = wined3d_surface_getdc(surface->wined3d_surface, &surface_dc)))

View File

@ -2431,11 +2431,6 @@ do { \
return WINED3D_OK;
}
struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_resource *resource)
{
return surface_from_resource(resource);
}
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{
TRACE("surface %p.\n", surface);

View File

@ -223,7 +223,6 @@
@ cdecl wined3d_stateblock_incref(ptr)
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
@ cdecl wined3d_surface_from_resource(ptr)
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)

View File

@ -2475,7 +2475,6 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *blt_fx, enum wined3d_texture_filter_type filter);
struct wined3d_surface * __cdecl wined3d_surface_from_resource(struct wined3d_resource *resource);
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);