Module: wine Branch: master Commit: 58c7c514858aecf6432c971164218641a61fdb05 URL: http://source.winehq.org/git/wine.git/?a=commit;h=58c7c514858aecf6432c971164...
Author: Jan Zerebecki jan.wine@zerebecki.de Date: Mon Apr 16 09:54:36 2007 +0200
wined3d: Remove resourceStoreCriticalSection.
---
dlls/wined3d/device.c | 15 --------------- dlls/wined3d/wined3d_main.c | 7 ------- 2 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 51fcfb3..dd9d320 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5807,9 +5807,6 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3 ResourceList* resourceList;
TRACE("(%p) : resource %p\n", This, resource); -#if 0 - EnterCriticalSection(&resourceStoreCriticalSection); -#endif /* add a new texture to the frot of the linked list */ resourceList = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ResourceList)); resourceList->resource = resource; @@ -5820,9 +5817,6 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3 This->resources = resourceList; TRACE("Added resource %p with element %p pointing to %p\n", resource, resourceList, resourceList->next);
-#if 0 - LeaveCriticalSection(&resourceStoreCriticalSection); -#endif return; }
@@ -5833,9 +5827,6 @@ static void WINAPI IWineD3DDeviceImpl_RemoveResource(IWineD3DDevice *iface, IWin
TRACE("(%p) : resource %p\n", This, resource);
-#if 0 - EnterCriticalSection(&resourceStoreCriticalSection); -#endif resourceList = This->resources;
while (resourceList != NULL) { @@ -5846,9 +5837,6 @@ static void WINAPI IWineD3DDeviceImpl_RemoveResource(IWineD3DDevice *iface, IWin
if (resourceList == NULL) { FIXME("Attempted to remove resource %p that hasn't been stored\n", resource); -#if 0 - LeaveCriticalSection(&resourceStoreCriticalSection); -#endif return; } else { TRACE("Found resource %p with element %p pointing to %p (previous %p)\n", resourceList->resource, resourceList, resourceList->next, previousResourceList); @@ -5860,9 +5848,6 @@ static void WINAPI IWineD3DDeviceImpl_RemoveResource(IWineD3DDevice *iface, IWin This->resources = resourceList->next; }
-#if 0 - LeaveCriticalSection(&resourceStoreCriticalSection); -#endif return; }
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 965d95d..5d00ba8 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -46,17 +46,14 @@ wined3d_settings_t wined3d_settings = };
WineD3DGlobalStatistics *wineD3DGlobalStatistics = NULL; -CRITICAL_SECTION resourceStoreCriticalSection;
long globalChangeGlRam(long glram){ /* FIXME: replace this function with object tracking */ int result;
- EnterCriticalSection(&resourceStoreCriticalSection); /* this is overkill really, but I suppose it should be thread safe */ wineD3DGlobalStatistics->glsurfaceram += glram; TRACE("Adjusted gl ram by %ld to %d\n", glram, wineD3DGlobalStatistics->glsurfaceram); result = wineD3DGlobalStatistics->glsurfaceram; - LeaveCriticalSection(&resourceStoreCriticalSection); return result;
} @@ -68,10 +65,6 @@ IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *p object->ref = 1; object->parent = parent;
- /* TODO: Move this off to device and possibly x11drv */ - /* Create a critical section for a dll global data store */ - InitializeCriticalSectionAndSpinCount(&resourceStoreCriticalSection, 0x80000400); - /*Create a structure for storing global data in*/ if(wineD3DGlobalStatistics == NULL){ TRACE("Creating global statistics store\n");