windowscodecs: Force debug info in critical sections.

This commit is contained in:
Paul Gofman 2024-02-21 22:00:23 -06:00 committed by Alexandre Julliard
parent fae3b7a90f
commit 4e49c37028
16 changed files with 21 additions and 21 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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++)

View file

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

View file

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

View file

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

View file

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

View file

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