Module: wine Branch: master Commit: 335a6ca78e18cdc0196377f8e258fb3e299b73dc URL: http://source.winehq.org/git/wine.git/?a=commit;h=335a6ca78e18cdc0196377f8e2...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Nov 2 22:46:54 2011 +0100
wined3d: Use wined3d_surface_blt() in swapchain_gl_present().
---
dlls/wined3d/surface.c | 19 ------------------- dlls/wined3d/swapchain.c | 7 +++++-- dlls/wined3d/wined3d_private.h | 2 -- 3 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 21848e9..1492071 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1815,25 +1815,6 @@ cpu: return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); }
-/* Do not call while under the GL lock. */ -HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, - struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags) -{ - RECT src_rect, dst_rect; - - TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect_in %s, flags %#x.\n", - dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect_in), flags); - - surface_get_rect(src_surface, src_rect_in, &src_rect); - - dst_rect.left = dst_x; - dst_rect.top = dst_y; - dst_rect.right = dst_x + src_rect.right - src_rect.left; - dst_rect.bottom = dst_y + src_rect.bottom - src_rect.top; - - return wined3d_surface_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, NULL, WINED3DTEXF_POINT); -} - HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *surface, struct wined3d_surface *render_target) { diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index e31b622..7d7be5b 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -482,9 +482,12 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
if (swapchain->device->logo_surface) { + struct wined3d_surface *src_surface = swapchain->device->logo_surface; + RECT rect = {0, 0, src_surface->resource.width, src_surface->resource.height}; + /* Blit the logo into the upper left corner of the drawable. */ - surface_bltfast(swapchain->back_buffers[0], 0, 0, - swapchain->device->logo_surface, NULL, WINEDDBLT_KEYSRC); + wined3d_surface_blt(swapchain->back_buffers[0], &rect, src_surface, &rect, + WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_POINT); }
TRACE("Presenting HDC %p.\n", context->hdc); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 26be952..2a987d5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2079,8 +2079,6 @@ static inline GLuint surface_get_texture_name(const struct wined3d_surface *surf
void surface_add_dirty_rect(struct wined3d_surface *surface, const WINED3DBOX *dirty_rect) DECLSPEC_HIDDEN; void surface_bind(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; -HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, - struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags) DECLSPEC_HIDDEN; HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const WINED3DCOLORVALUE *color) DECLSPEC_HIDDEN; GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; BOOL surface_init_sysmem(struct wined3d_surface *surface) DECLSPEC_HIDDEN;