Henri Verbeet : ddraw: The ddraw surface is now always the wined3d surface' s parent.

Alexandre Julliard julliard at winehq.org
Fri Sep 25 10:25:41 CDT 2009


Module: wine
Branch: master
Commit: 33bfcdd04452accf40256e1693b6a934e817dec9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=33bfcdd04452accf40256e1693b6a934e817dec9

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Sep 25 13:31:51 2009 +0200

ddraw: The ddraw surface is now always the wined3d surface's parent.

This GetParent() trick would now cause infinite recursion.

---

 dlls/ddraw/surface.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index a3f39ef..3d41d18 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -365,43 +365,6 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
              */
             TRACE("(%p) D3D unloaded\n", This);
         }
-        else if(This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE |
-                                                     DDSCAPS_3DDEVICE       |
-                                                     DDSCAPS_TEXTURE        ) )
-        {
-            /* It's a render target, but no swapchain was created.
-             * The IParent interfaces have to be released manually.
-             * The same applies for textures without an
-             * IWineD3DTexture object attached
-             */
-            IParent *Parent;
-
-            for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
-            {
-                if(This->complex_array[i])
-                {
-                    /* Only the topmost level can have more than 1 surfaces in the complex
-                     * attachment array(Cube texture roots), for all others there is only
-                     * one
-                     */
-                    surf = This->complex_array[i];
-                    while(surf)
-                    {
-                        IWineD3DSurface_GetParent(surf->WineD3DSurface,
-                                                  (IUnknown **) &Parent);
-                        IParent_Release(Parent);  /* For the getParent */
-                        IParent_Release(Parent);  /* To release it */
-                        surf = surf->complex_array[0];
-                    }
-                }
-            }
-
-            /* Now the top-level surface */
-            IWineD3DSurface_GetParent(This->WineD3DSurface,
-                                      (IUnknown **) &Parent);
-            IParent_Release(Parent);  /* For the getParent */
-            IParent_Release(Parent);  /* To release it */
-        }
 
         /* The refcount test shows that the palette is detached when the surface is destroyed */
         IDirectDrawSurface7_SetPalette((IDirectDrawSurface7 *)This, NULL);




More information about the wine-cvs mailing list