Commit 4e49c370 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

windowscodecs: Force debug info in critical sections.

parent fae3b7a9
......@@ -825,7 +825,7 @@ HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight, UINT stride, UINT datasiz
This->bpp = bpp;
memcpy(&This->pixelformat, pixelFormat, sizeof(GUID));
This->dpix = This->dpiy = 0.0;
InitializeCriticalSection(&This->cs);
InitializeCriticalSectionEx(&This->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BitmapImpl.lock");
*ppIBitmap = &This->IWICBitmap_iface;
......
......@@ -1161,7 +1161,7 @@ static HRESULT BmpDecoder_Create(int packed, int icoframe, BmpDecoder **ppDecode
This->initialized = FALSE;
This->stream = NULL;
This->imagedata = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BmpDecoder.lock");
This->packed = packed;
This->icoframe = icoframe;
......
......@@ -250,7 +250,7 @@ HRESULT BitmapClipper_Create(IWICBitmapClipper **clipper)
This->IWICBitmapClipper_iface.lpVtbl = &BitmapClipper_Vtbl;
This->ref = 1;
This->source = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BitmapClipper.lock");
*clipper = &This->IWICBitmapClipper_iface;
......
......@@ -1843,7 +1843,7 @@ HRESULT FormatConverter_CreateInstance(REFIID iid, void** ppv)
This->ref = 1;
This->source = NULL;
This->palette = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FormatConverter.lock");
ret = IWICFormatConverter_QueryInterface(&This->IWICFormatConverter_iface, iid, ppv);
......
......@@ -1051,7 +1051,7 @@ static HRESULT DdsFrameDecode_CreateInstance(DdsFrameDecode **frame_decode)
result->IWICBitmapFrameDecode_iface.lpVtbl = &DdsFrameDecode_Vtbl;
result->IWICDdsFrameDecode_iface.lpVtbl = &DdsFrameDecode_Dds_Vtbl;
result->ref = 1;
InitializeCriticalSection(&result->lock);
InitializeCriticalSectionEx(&result->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
result->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DdsFrameDecode.lock");
*frame_decode = result;
......@@ -1761,7 +1761,7 @@ HRESULT DdsDecoder_CreateInstance(REFIID iid, void** ppv)
This->ref = 1;
This->initialized = FALSE;
This->stream = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DdsDecoder.lock");
ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv);
......@@ -2140,7 +2140,7 @@ HRESULT DdsEncoder_CreateInstance( REFIID iid, void **ppv)
This->frame_index = 0;
This->uncommitted_frame = FALSE;
This->committed = FALSE;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DdsEncoder.lock");
ret = IWICBitmapEncoder_QueryInterface(&This->IWICBitmapEncoder_iface, iid, ppv);
......
......@@ -797,7 +797,7 @@ HRESULT CommonDecoder_CreateInstance(struct decoder *decoder,
This->stream = NULL;
This->decoder = decoder;
This->decoder_info = *decoder_info;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CommonDecoder.lock");
hr = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv);
......
......@@ -889,7 +889,7 @@ HRESULT CommonEncoder_CreateInstance(struct encoder *encoder,
This->frame_count = 0;
This->uncommitted_frame = FALSE;
This->committed = FALSE;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CommonEncoder.lock");
ret = IWICBitmapEncoder_QueryInterface(&This->IWICBitmapEncoder_iface, iid, ppv);
......
......@@ -276,7 +276,7 @@ HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator)
This->flip_x = 0;
This->flip_y = 0;
This->swap_xy = 0;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FlipRotator.lock");
*fliprotator = &This->IWICBitmapFlipRotator_iface;
......
......@@ -1415,7 +1415,7 @@ HRESULT GifDecoder_CreateInstance(REFIID iid, void** ppv)
This->initialized = FALSE;
This->gif = NULL;
This->current_frame = 0;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": GifDecoder.lock");
ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv);
......@@ -2481,7 +2481,7 @@ HRESULT GifEncoder_CreateInstance(REFIID iid, void **ppv)
This->IWICBitmapEncoder_iface.lpVtbl = &GifEncoder_Vtbl;
This->ref = 1;
This->stream = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": GifEncoder.lock");
This->initialized = FALSE;
This->info_written = FALSE;
......
......@@ -770,7 +770,7 @@ HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv)
This->ref = 1;
This->stream = NULL;
This->initialized = FALSE;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IcoDecoder.lock");
ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv);
......
......@@ -2291,7 +2291,7 @@ static HRESULT WINAPI ComponentEnum_Clone(IEnumUnknown *iface, IEnumUnknown **pp
new_enum->ref = 1;
new_enum->cursor = NULL;
list_init(&new_enum->objects);
InitializeCriticalSection(&new_enum->lock);
InitializeCriticalSectionEx(&new_enum->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
new_enum->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock");
EnterCriticalSection(&This->lock);
......@@ -2361,7 +2361,7 @@ HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnkn
This->IEnumUnknown_iface.lpVtbl = &ComponentEnumVtbl;
This->ref = 1;
list_init(&This->objects);
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock");
for (category=categories; category->type && hr == S_OK; category++)
......
......@@ -410,7 +410,7 @@ HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, voi
This->items = NULL;
This->item_count = 0;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MetadataHandler.lock");
hr = IWICMetadataWriter_QueryInterface(&This->IWICMetadataWriter_iface, iid, ppv);
......
......@@ -906,7 +906,7 @@ HRESULT PaletteImpl_Create(IWICPalette **palette)
This->count = 0;
This->colors = NULL;
This->type = WICBitmapPaletteTypeCustom;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PaletteImpl.lock");
*palette = &This->IWICPalette_iface;
......
......@@ -527,7 +527,7 @@ HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler)
This->src_height = 0;
This->mode = 0;
This->bpp = 0;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BitmapScaler.lock");
*scaler = &This->IWICBitmapScaler_iface;
......
......@@ -1002,7 +1002,7 @@ static HRESULT WINAPI IWICStreamImpl_InitializeFromMemory(IWICStream *iface,
pObject->pbMemory = pbBuffer;
pObject->dwMemsize = cbBufferSize;
pObject->dwCurPos = 0;
InitializeCriticalSection(&pObject->lock);
InitializeCriticalSectionEx(&pObject->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
pObject->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": StreamOnMemory.lock");
if (InterlockedCompareExchangePointer((void**)&This->pStream, pObject, NULL))
......@@ -1107,7 +1107,7 @@ static HRESULT WINAPI IWICStreamImpl_InitializeFromIStreamRegion(IWICStream *ifa
pObject->pos.QuadPart = 0;
pObject->offset = ulOffset;
pObject->max_size = ulMaxSize;
InitializeCriticalSection(&pObject->lock);
InitializeCriticalSectionEx(&pObject->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
pObject->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": StreamOnStreamRange.lock");
if (InterlockedCompareExchangePointer((void**)&This->pStream, pObject, NULL))
......
......@@ -953,7 +953,7 @@ HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv)
This->initialized = FALSE;
This->stream = NULL;
This->imagebits = NULL;
InitializeCriticalSection(&This->lock);
InitializeCriticalSectionEx(&This->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": TgaDecoder.lock");
ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment