wined3d: Remove resourceStoreCriticalSection.

This commit is contained in:
Jan Zerebecki 2007-04-16 09:54:36 +02:00 committed by Alexandre Julliard
parent d553159eac
commit 58c7c51485
2 changed files with 0 additions and 22 deletions

View File

@ -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;
}

View File

@ -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");