Module: wine Branch: master Commit: 257ee8cc6e63acc54576f60ad09de5b4051f8045 URL: http://source.winehq.org/git/wine.git/?a=commit;h=257ee8cc6e63acc54576f60ad0...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Jan 29 18:48:54 2016 +0100
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
---
dlls/ddraw/ddraw.c | 2 +- dlls/ddraw/ddraw_private.h | 2 +- dlls/ddraw/surface.c | 4 ++-- dlls/wined3d/surface.c | 5 ----- dlls/wined3d/wined3d.spec | 1 - include/wine/wined3d.h | 1 - 6 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index d7bf099..89ce07a 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -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; } diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 4fb1820..704d6db 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -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;
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index ac1c140..3e57ad6 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -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))) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7b1cf28..86e5290 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -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); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index cd8174c..c8a172f 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -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) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index bd0a9c7..c502cc4 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -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);