Module: wine
Branch: master
Commit: 3346fc747c6ca7842a6cd8cc12f9793cb39ae701
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3346fc747c6ca7842a6cd8cc1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Sun Sep 4 22:43:50 2011 +0200
wined3d: Get rid of the rect checks for present in IWineD3DSurfaceImpl_BltOverride().
---
dlls/wined3d/surface.c | 55 +----------------------------------------------
1 files changed, 2 insertions(+), 53 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b8ff92d..de97735 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5321,61 +5321,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
/* Half-Life does a Blt from the back buffer to the front buffer,
* Full surface size, no flags... Use present instead
*
- * This path will only be entered for d3d7 and ddraw apps, because d3d8/9 offer no way to blit TO the front buffer
- */
-
- /* Check rects - wined3d_swapchain_present() doesn't handle them. */
+ * This path will only be entered for d3d7 and ddraw apps, because
+ * d3d8/9 offer no way to blit to the front buffer. */
for (;;)
{
- TRACE("Looking if a Present can be done...\n");
- /* Source Rectangle must be full surface */
- if (src_rect->left || src_rect->top
- || src_rect->right != src_surface->resource.width
- || src_rect->bottom != src_surface->resource.height)
- {
- TRACE("No, Source rectangle doesn't match\n");
- break;
- }
-
- /* No stretching may occur */
- if (src_rect->right != dst_rect->right - dst_rect->left
- || src_rect->bottom != dst_rect->bottom - dst_rect->top)
- {
- TRACE("No, stretching is done\n");
- break;
- }
-
- /* Destination must be full surface or match the clipping rectangle */
- if (dst_surface->clipper && dst_surface->clipper->hWnd)
- {
- RECT cliprect;
- POINT pos[2];
- GetClientRect(dst_surface->clipper->hWnd, &cliprect);
- pos[0].x = dst_rect->left;
- pos[0].y = dst_rect->top;
- pos[1].x = dst_rect->right;
- pos[1].y = dst_rect->bottom;
- MapWindowPoints(GetDesktopWindow(), dst_surface->clipper->hWnd, pos, 2);
-
- if (pos[0].x != cliprect.left || pos[0].y != cliprect.top
- || pos[1].x != cliprect.right || pos[1].y != cliprect.bottom)
- {
- TRACE("No, dest rectangle doesn't match(clipper)\n");
- TRACE("Clip rect at %s\n", wine_dbgstr_rect(&cliprect));
- TRACE("Blt dest: %s\n", wine_dbgstr_rect(dst_rect));
- break;
- }
- }
- else if (dst_rect->left || dst_rect->top
- || dst_rect->right != dst_surface->resource.width
- || dst_rect->bottom != dst_surface->resource.height)
- {
- TRACE("No, dest rectangle doesn't match(surface size)\n");
- break;
- }
-
- TRACE("Yes\n");
-
/* These flags are unimportant for the flag check, remove them */
if (!(flags & ~(WINEDDBLT_DONOTWAIT | WINEDDBLT_WAIT)))
{