wined3d: Use wined3d_surface_blt() in swapchain_gl_present().

This commit is contained in:
Henri Verbeet 2011-11-02 22:46:54 +01:00 committed by Alexandre Julliard
parent 0b3185665f
commit 335a6ca78e
3 changed files with 5 additions and 23 deletions

View File

@ -1815,25 +1815,6 @@ cpu:
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); 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, HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *surface,
struct wined3d_surface *render_target) struct wined3d_surface *render_target)
{ {

View File

@ -482,9 +482,12 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
if (swapchain->device->logo_surface) 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. */ /* Blit the logo into the upper left corner of the drawable. */
surface_bltfast(swapchain->back_buffers[0], 0, 0, wined3d_surface_blt(swapchain->back_buffers[0], &rect, src_surface, &rect,
swapchain->device->logo_surface, NULL, WINEDDBLT_KEYSRC); WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_POINT);
} }
TRACE("Presenting HDC %p.\n", context->hdc); TRACE("Presenting HDC %p.\n", context->hdc);

View File

@ -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_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; 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; 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; GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
BOOL surface_init_sysmem(struct wined3d_surface *surface) DECLSPEC_HIDDEN; BOOL surface_init_sysmem(struct wined3d_surface *surface) DECLSPEC_HIDDEN;