Commit 257ee8cc authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Use wined3d_texture_blt() in ddraw_surface_update_frontbuffer().

parent 1a812eb6
...@@ -4822,7 +4822,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic ...@@ -4822,7 +4822,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return hr; return hr;
} }
ddraw->wined3d_frontbuffer = wined3d_surface_from_resource(wined3d_texture_get_sub_resource(*texture, 0)); ddraw->wined3d_frontbuffer = *texture;
return hr; return hr;
} }
......
...@@ -92,7 +92,7 @@ struct ddraw ...@@ -92,7 +92,7 @@ struct ddraw
struct ddraw_surface *primary; struct ddraw_surface *primary;
RECT primary_lock; RECT primary_lock;
struct wined3d_surface *wined3d_frontbuffer; struct wined3d_texture *wined3d_frontbuffer;
struct wined3d_swapchain *wined3d_swapchain; struct wined3d_swapchain *wined3d_swapchain;
HWND swapchain_window; HWND swapchain_window;
......
...@@ -69,8 +69,8 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE ...@@ -69,8 +69,8 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
if (read) if (read)
return DD_OK; return DD_OK;
return wined3d_surface_blt(surface->ddraw->wined3d_frontbuffer, rect, return wined3d_texture_blt(surface->ddraw->wined3d_frontbuffer, 0, rect,
surface->wined3d_surface, rect, 0, NULL, WINED3D_TEXF_POINT); surface->wined3d_texture, surface->sub_resource_idx, rect, 0, NULL, WINED3D_TEXF_POINT);
} }
if (FAILED(hr = wined3d_surface_getdc(surface->wined3d_surface, &surface_dc))) if (FAILED(hr = wined3d_surface_getdc(surface->wined3d_surface, &surface_dc)))
......
...@@ -2431,11 +2431,6 @@ do { \ ...@@ -2431,11 +2431,6 @@ do { \
return WINED3D_OK; 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) HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{ {
TRACE("surface %p.\n", surface); TRACE("surface %p.\n", surface);
......
...@@ -223,7 +223,6 @@ ...@@ -223,7 +223,6 @@
@ cdecl wined3d_stateblock_incref(ptr) @ cdecl wined3d_stateblock_incref(ptr)
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long) @ 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_overlay_position(ptr ptr ptr)
@ cdecl wined3d_surface_get_parent(ptr) @ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr) @ cdecl wined3d_surface_get_pitch(ptr)
......
...@@ -2475,7 +2475,6 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock); ...@@ -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, 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, struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *blt_fx, enum wined3d_texture_filter_type filter); 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); 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); void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface); DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
......
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