Markus Amsler : d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 22 05:21:27 CST 2006


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

Author: Markus Amsler <markus.amsler at oribi.org>
Date:   Mon Nov 20 10:47:49 2006 +0100

d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface.

---

 dlls/d3d8/device.c    |    1 -
 dlls/d3d9/device.c    |    1 -
 dlls/wined3d/device.c |    4 ----
 3 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 0baa5ac..2c9329f 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -698,7 +698,6 @@ static HRESULT  WINAPI  IDirect3DDevice8
     hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
     if(hr == D3D_OK && pZStencilSurface != NULL){
         IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface);
-        IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface);
     }else{
         FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed\n");
         *ppZStencilSurface = NULL;
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 9b31289..34a2e1c 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -433,7 +433,6 @@ static HRESULT  WINAPI  IDirect3DDevice9
     hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
     if(hr == D3D_OK && pZStencilSurface != NULL){
         IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface);
-        IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface);
     }else{
         FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
         *ppZStencilSurface = NULL;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a42d91c..9812c6f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6981,10 +6981,6 @@ static HRESULT  WINAPI  IWineD3DDeviceIm
     *ppZStencilSurface = This->depthStencilBuffer;
     TRACE("(%p) : zStencilSurface  returning %p\n", This,  *ppZStencilSurface);
 
-    if(*ppZStencilSurface != NULL) {
-        /* Note inc ref on returned surface */
-        IWineD3DSurface_AddRef(*ppZStencilSurface);
-    }
     return WINED3D_OK;
 }
 




More information about the wine-cvs mailing list