Henri Verbeet : wined3d: Remove some redundant code in IWineD3DVertexDeclarationImpl_Release().

Alexandre Julliard julliard at winehq.org
Mon Sep 28 11:54:36 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Sep 28 10:05:01 2009 +0200

wined3d: Remove some redundant code in IWineD3DVertexDeclarationImpl_Release().

The situation the code tests for should never happen because either the
stateblock will still have a reference to the vertex declaration, or the
stateblock itself will be released.

---

 dlls/wined3d/vertexdeclaration.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
index 18ea03a..6d617ed 100644
--- a/dlls/wined3d/vertexdeclaration.c
+++ b/dlls/wined3d/vertexdeclaration.c
@@ -68,13 +68,8 @@ static ULONG WINAPI IWineD3DVertexDeclarationImpl_Release(IWineD3DVertexDeclarat
     ULONG ref;
     TRACE("(%p) : Releasing from %d\n", This, This->ref);
     ref = InterlockedDecrement(&This->ref);
-    if (ref == 0) {
-        if (This->wineD3DDevice->stateBlock && iface == This->wineD3DDevice->stateBlock->vertexDecl)
-        {
-            /* See comment in PixelShader::Release */
-            IWineD3DDeviceImpl_MarkStateDirty(This->wineD3DDevice, STATE_VDECL);
-        }
-
+    if (!ref)
+    {
         HeapFree(GetProcessHeap(), 0, This->elements);
         This->parent_ops->wined3d_object_destroyed(This->parent);
         HeapFree(GetProcessHeap(), 0, This);




More information about the wine-cvs mailing list