[PATCH 4/4] wined3d: remove unneeded memory cleanup code from BltOverride

Roderick Colenbrander thunderbird2k at gmail.com
Tue May 18 02:30:46 CDT 2010


I asked Stefan if he had an idea why this piece of code was around but he had no idea. According to git logs
this code was added in May 2006 when BltOverride was introduced. It looks like it was copied from the old ddraw
code. A lot of code was rewritten during the years (at some point there was a ModifyLocation(INDRAWABLE) after it).
We think the code is not needed and the code was wrong anyway since it didn't check whether the pointers it freed
where valid.
---
 dlls/wined3d/surface.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9731ed5..7f82680 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3601,18 +3601,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
             TRACE("Using hardware stretching to flip / stretch the texture\n");
             fb_copy_to_texture_hwstretch(dst_surface, src_surface, &src_rect, &dst_rect, Filter);
         }
-
-        if (!(dst_surface->Flags & SFLAG_DONOTFREE))
-        {
-            HeapFree(GetProcessHeap(), 0, dst_surface->resource.heapMemory);
-            dst_surface->resource.allocatedMemory = NULL;
-            dst_surface->resource.heapMemory = NULL;
-        }
-        else
-        {
-            dst_surface->Flags &= ~SFLAG_INSYSMEM;
-        }
-
         return WINED3D_OK;
     }
     else if (src_surface)
-- 
1.6.3.3




More information about the wine-patches mailing list