Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/bitmap.c | 4 ++-- dlls/windowscodecs/bmpdecode.c | 2 +- dlls/windowscodecs/bmpencode.c | 2 +- dlls/windowscodecs/clipper.c | 4 ++-- dlls/windowscodecs/colortransform.c | 2 +- dlls/windowscodecs/converter.c | 2 +- dlls/windowscodecs/fliprotate.c | 2 +- dlls/windowscodecs/gifformat.c | 2 +- dlls/windowscodecs/icnsformat.c | 2 +- dlls/windowscodecs/icoformat.c | 2 +- dlls/windowscodecs/jpegformat.c | 4 ++-- dlls/windowscodecs/pngformat.c | 4 ++-- dlls/windowscodecs/scaler.c | 2 +- dlls/windowscodecs/tgaformat.c | 2 +- dlls/windowscodecs/tiffformat.c | 4 ++-- dlls/windowscodecs/wincodecs_private.h | 8 ++++++++ 16 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/dlls/windowscodecs/bitmap.c b/dlls/windowscodecs/bitmap.c index 116fd3134a..e8fe822e84 100644 --- a/dlls/windowscodecs/bitmap.c +++ b/dlls/windowscodecs/bitmap.c @@ -358,7 +358,7 @@ static HRESULT WINAPI BitmapImpl_CopyPixels(IWICBitmap *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { BitmapImpl *This = impl_from_IWICBitmap(iface); - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
return copy_pixels(This->bpp, This->data, This->width, This->height, This->stride, prc, cbStride, cbBufferSize, pbBuffer); @@ -371,7 +371,7 @@ static HRESULT WINAPI BitmapImpl_Lock(IWICBitmap *iface, const WICRect *prcLock, BitmapLockImpl *result; WICRect rc;
- TRACE("(%p,%p,%x,%p)\n", iface, prcLock, flags, ppILock); + TRACE("(%p,%s,%x,%p)\n", iface, debug_wic_rect(prcLock), flags, ppILock);
if (!(flags & (WICBitmapLockRead|WICBitmapLockWrite)) || !ppILock) return E_INVALIDARG; diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c index 4109bad4b3..6254b150ca 100644 --- a/dlls/windowscodecs/bmpdecode.c +++ b/dlls/windowscodecs/bmpdecode.c @@ -321,7 +321,7 @@ static HRESULT WINAPI BmpFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); HRESULT hr=S_OK; UINT width, height; - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
EnterCriticalSection(&This->lock); if (!This->imagedata) diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index aa65675a98..fb04f9ddb2 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -284,7 +284,7 @@ static HRESULT WINAPI BmpFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, { BmpFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); HRESULT hr; - TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); + TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) return WINCODEC_ERR_WRONGSTATE; diff --git a/dlls/windowscodecs/clipper.c b/dlls/windowscodecs/clipper.c index 94127f3df1..02e0d967f5 100644 --- a/dlls/windowscodecs/clipper.c +++ b/dlls/windowscodecs/clipper.c @@ -167,7 +167,7 @@ static HRESULT WINAPI BitmapClipper_CopyPixels(IWICBitmapClipper *iface, BitmapClipper *This = impl_from_IWICBitmapClipper(iface); WICRect rect;
- TRACE("(%p,%p,%u,%u,%p)\n", iface, rc, stride, buffer_size, buffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(rc), stride, buffer_size, buffer);
if (!This->source) return WINCODEC_ERR_WRONGSTATE; @@ -199,7 +199,7 @@ static HRESULT WINAPI BitmapClipper_Initialize(IWICBitmapClipper *iface, UINT width, height; HRESULT hr = S_OK;
- TRACE("(%p,%p,%p)\n", iface, source, rc); + TRACE("(%p,%p,%s)\n", iface, source, debug_wic_rect(rc));
EnterCriticalSection(&This->lock);
diff --git a/dlls/windowscodecs/colortransform.c b/dlls/windowscodecs/colortransform.c index 5b1c7e8b70..af66c67443 100644 --- a/dlls/windowscodecs/colortransform.c +++ b/dlls/windowscodecs/colortransform.c @@ -133,7 +133,7 @@ static HRESULT WINAPI ColorTransform_CopyPixels(IWICColorTransform *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { ColorTransform *This = impl_from_IWICColorTransform(iface); - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
return IWICBitmapSource_CopyPixels(This->dst, prc, cbStride, cbBufferSize, pbBuffer); } diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 42ba260223..6e7bb8e781 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -1360,7 +1360,7 @@ static HRESULT WINAPI FormatConverter_CopyPixels(IWICFormatConverter *iface, FormatConverter *This = impl_from_IWICFormatConverter(iface); WICRect rc; HRESULT hr; - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
if (This->source) { diff --git a/dlls/windowscodecs/fliprotate.c b/dlls/windowscodecs/fliprotate.c index 72d1e8a287..46402237ee 100644 --- a/dlls/windowscodecs/fliprotate.c +++ b/dlls/windowscodecs/fliprotate.c @@ -161,7 +161,7 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface, WICRect rc; WICRect rect;
- TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
if (!This->source) return WINCODEC_ERR_WRONGSTATE;
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 0eb1d804ec..df202ba45a 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -795,7 +795,7 @@ static HRESULT WINAPI GifFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { GifFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
if (This->frame->ImageDesc.Interlace) { diff --git a/dlls/windowscodecs/icnsformat.c b/dlls/windowscodecs/icnsformat.c index aa9640417f..02e8ee97e6 100644 --- a/dlls/windowscodecs/icnsformat.c +++ b/dlls/windowscodecs/icnsformat.c @@ -390,7 +390,7 @@ static HRESULT WINAPI IcnsFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, IcnsFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); HRESULT hr;
- TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); + TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) return WINCODEC_ERR_WRONGSTATE; diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index dc08fd5576..d2a6196cd0 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -176,7 +176,7 @@ static HRESULT WINAPI IcoFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { IcoFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
return copy_pixels(32, This->bits, This->width, This->height, This->width * 4, prc, cbStride, cbBufferSize, pbBuffer); diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index d24af6dc9e..bb3d418667 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -592,7 +592,7 @@ static HRESULT WINAPI JpegDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, UINT max_row_needed; jmp_buf jmpbuf; WICRect rect; - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
if (!prc) { @@ -1204,7 +1204,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WriteSource(IWICBitmapFrameEncode *iface { JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface); HRESULT hr; - TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); + TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->frame_initialized) return WINCODEC_ERR_WRONGSTATE; diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 3f0ab39bd2..3ac7dee896 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -1094,7 +1094,7 @@ static HRESULT WINAPI PngDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { PngDecoder *This = impl_from_IWICBitmapFrameDecode(iface); - TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
return copy_pixels(This->bpp, This->image_bits, This->width, This->height, This->stride, @@ -1745,7 +1745,7 @@ static HRESULT WINAPI PngFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, { PngEncoder *This = impl_from_IWICBitmapFrameEncode(iface); HRESULT hr; - TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); + TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->frame_initialized) return WINCODEC_ERR_WRONGSTATE; diff --git a/dlls/windowscodecs/scaler.c b/dlls/windowscodecs/scaler.c index 46f1dbfb81..b02f19253a 100644 --- a/dlls/windowscodecs/scaler.c +++ b/dlls/windowscodecs/scaler.c @@ -204,7 +204,7 @@ static HRESULT WINAPI BitmapScaler_CopyPixels(IWICBitmapScaler *iface, ULONG buffer_size; UINT y;
- TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
EnterCriticalSection(&This->lock);
diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c index b3d9aeae26..72c9baa016 100644 --- a/dlls/windowscodecs/tgaformat.c +++ b/dlls/windowscodecs/tgaformat.c @@ -890,7 +890,7 @@ static HRESULT WINAPI TgaDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, TgaDecoder *This = impl_from_IWICBitmapFrameDecode(iface); HRESULT hr;
- TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
hr = TgaDecoder_ReadImage(This);
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 966ab3eb4b..5585718a9e 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -1070,7 +1070,7 @@ static HRESULT WINAPI TiffFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, UINT bytesperrow; WICRect rect;
- TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
if (!prc) { @@ -1726,7 +1726,7 @@ static HRESULT WINAPI TiffFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, TiffFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); HRESULT hr;
- TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); + TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) return WINCODEC_ERR_WRONGSTATE; diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index f7950c4105..2221cc7dce 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -21,6 +21,8 @@
#include "wincodec.h" #include "wincodecsdk.h" + +#include "wine/debug.h" #include "wine/unicode.h"
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04); @@ -178,4 +180,10 @@ static inline WCHAR *heap_strdupW(const WCHAR *src) return dst; }
+static inline const char *debug_wic_rect(const WICRect *rect) +{ + if (!rect) return "(null)"; + return wine_dbg_sprintf("(%u,%u)-(%u,%u)", rect->X, rect->Y, rect->Width, rect->Height); +} + #endif /* WINCODECS_PRIVATE_H */