Commit 5976988b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

wincodecs: Trace WICRect arguments.

parent 9556419d
...@@ -358,7 +358,7 @@ static HRESULT WINAPI BitmapImpl_CopyPixels(IWICBitmap *iface, ...@@ -358,7 +358,7 @@ static HRESULT WINAPI BitmapImpl_CopyPixels(IWICBitmap *iface,
const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
{ {
BitmapImpl *This = impl_from_IWICBitmap(iface); 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, return copy_pixels(This->bpp, This->data, This->width, This->height,
This->stride, prc, cbStride, cbBufferSize, pbBuffer); This->stride, prc, cbStride, cbBufferSize, pbBuffer);
...@@ -371,7 +371,7 @@ static HRESULT WINAPI BitmapImpl_Lock(IWICBitmap *iface, const WICRect *prcLock, ...@@ -371,7 +371,7 @@ static HRESULT WINAPI BitmapImpl_Lock(IWICBitmap *iface, const WICRect *prcLock,
BitmapLockImpl *result; BitmapLockImpl *result;
WICRect rc; 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) if (!(flags & (WICBitmapLockRead|WICBitmapLockWrite)) || !ppILock)
return E_INVALIDARG; return E_INVALIDARG;
......
...@@ -321,7 +321,7 @@ static HRESULT WINAPI BmpFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -321,7 +321,7 @@ static HRESULT WINAPI BmpFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface);
HRESULT hr=S_OK; HRESULT hr=S_OK;
UINT width, height; 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); EnterCriticalSection(&This->lock);
if (!This->imagedata) if (!This->imagedata)
......
...@@ -284,7 +284,7 @@ static HRESULT WINAPI BmpFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, ...@@ -284,7 +284,7 @@ static HRESULT WINAPI BmpFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
{ {
BmpFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); BmpFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr; HRESULT hr;
TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) if (!This->initialized)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
......
...@@ -167,7 +167,7 @@ static HRESULT WINAPI BitmapClipper_CopyPixels(IWICBitmapClipper *iface, ...@@ -167,7 +167,7 @@ static HRESULT WINAPI BitmapClipper_CopyPixels(IWICBitmapClipper *iface,
BitmapClipper *This = impl_from_IWICBitmapClipper(iface); BitmapClipper *This = impl_from_IWICBitmapClipper(iface);
WICRect rect; 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) if (!This->source)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
...@@ -199,7 +199,7 @@ static HRESULT WINAPI BitmapClipper_Initialize(IWICBitmapClipper *iface, ...@@ -199,7 +199,7 @@ static HRESULT WINAPI BitmapClipper_Initialize(IWICBitmapClipper *iface,
UINT width, height; UINT width, height;
HRESULT hr = S_OK; 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); EnterCriticalSection(&This->lock);
......
...@@ -133,7 +133,7 @@ static HRESULT WINAPI ColorTransform_CopyPixels(IWICColorTransform *iface, ...@@ -133,7 +133,7 @@ static HRESULT WINAPI ColorTransform_CopyPixels(IWICColorTransform *iface,
const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
{ {
ColorTransform *This = impl_from_IWICColorTransform(iface); 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); return IWICBitmapSource_CopyPixels(This->dst, prc, cbStride, cbBufferSize, pbBuffer);
} }
......
...@@ -1360,7 +1360,7 @@ static HRESULT WINAPI FormatConverter_CopyPixels(IWICFormatConverter *iface, ...@@ -1360,7 +1360,7 @@ static HRESULT WINAPI FormatConverter_CopyPixels(IWICFormatConverter *iface,
FormatConverter *This = impl_from_IWICFormatConverter(iface); FormatConverter *This = impl_from_IWICFormatConverter(iface);
WICRect rc; WICRect rc;
HRESULT hr; 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) if (This->source)
{ {
......
...@@ -161,7 +161,7 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface, ...@@ -161,7 +161,7 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface,
WICRect rc; WICRect rc;
WICRect rect; 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; if (!This->source) return WINCODEC_ERR_WRONGSTATE;
......
...@@ -795,7 +795,7 @@ static HRESULT WINAPI GifFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -795,7 +795,7 @@ static HRESULT WINAPI GifFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
{ {
GifFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); 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) if (This->frame->ImageDesc.Interlace)
{ {
......
...@@ -390,7 +390,7 @@ static HRESULT WINAPI IcnsFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, ...@@ -390,7 +390,7 @@ static HRESULT WINAPI IcnsFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
IcnsFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); IcnsFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr; HRESULT hr;
TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) if (!This->initialized)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
......
...@@ -176,7 +176,7 @@ static HRESULT WINAPI IcoFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -176,7 +176,7 @@ static HRESULT WINAPI IcoFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
{ {
IcoFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); 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, return copy_pixels(32, This->bits, This->width, This->height, This->width * 4,
prc, cbStride, cbBufferSize, pbBuffer); prc, cbStride, cbBufferSize, pbBuffer);
......
...@@ -592,7 +592,7 @@ static HRESULT WINAPI JpegDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -592,7 +592,7 @@ static HRESULT WINAPI JpegDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface,
UINT max_row_needed; UINT max_row_needed;
jmp_buf jmpbuf; jmp_buf jmpbuf;
WICRect rect; 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) if (!prc)
{ {
...@@ -1204,7 +1204,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WriteSource(IWICBitmapFrameEncode *iface ...@@ -1204,7 +1204,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WriteSource(IWICBitmapFrameEncode *iface
{ {
JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface); JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr; 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) if (!This->frame_initialized)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
......
...@@ -1094,7 +1094,7 @@ static HRESULT WINAPI PngDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -1094,7 +1094,7 @@ static HRESULT WINAPI PngDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface,
const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
{ {
PngDecoder *This = impl_from_IWICBitmapFrameDecode(iface); 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, return copy_pixels(This->bpp, This->image_bits,
This->width, This->height, This->stride, This->width, This->height, This->stride,
...@@ -1745,7 +1745,7 @@ static HRESULT WINAPI PngFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, ...@@ -1745,7 +1745,7 @@ static HRESULT WINAPI PngFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
{ {
PngEncoder *This = impl_from_IWICBitmapFrameEncode(iface); PngEncoder *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr; 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) if (!This->frame_initialized)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
......
...@@ -204,7 +204,7 @@ static HRESULT WINAPI BitmapScaler_CopyPixels(IWICBitmapScaler *iface, ...@@ -204,7 +204,7 @@ static HRESULT WINAPI BitmapScaler_CopyPixels(IWICBitmapScaler *iface,
ULONG buffer_size; ULONG buffer_size;
UINT y; 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); EnterCriticalSection(&This->lock);
......
...@@ -890,7 +890,7 @@ static HRESULT WINAPI TgaDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -890,7 +890,7 @@ static HRESULT WINAPI TgaDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface,
TgaDecoder *This = impl_from_IWICBitmapFrameDecode(iface); TgaDecoder *This = impl_from_IWICBitmapFrameDecode(iface);
HRESULT hr; 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); hr = TgaDecoder_ReadImage(This);
......
...@@ -1070,7 +1070,7 @@ static HRESULT WINAPI TiffFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, ...@@ -1070,7 +1070,7 @@ static HRESULT WINAPI TiffFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
UINT bytesperrow; UINT bytesperrow;
WICRect rect; 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) if (!prc)
{ {
...@@ -1726,7 +1726,7 @@ static HRESULT WINAPI TiffFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, ...@@ -1726,7 +1726,7 @@ static HRESULT WINAPI TiffFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
TiffFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); TiffFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr; HRESULT hr;
TRACE("(%p,%p,%p)\n", iface, pIBitmapSource, prc); TRACE("(%p,%p,%s)\n", iface, pIBitmapSource, debug_wic_rect(prc));
if (!This->initialized) if (!This->initialized)
return WINCODEC_ERR_WRONGSTATE; return WINCODEC_ERR_WRONGSTATE;
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "wincodec.h" #include "wincodec.h"
#include "wincodecsdk.h" #include "wincodecsdk.h"
#include "wine/debug.h"
#include "wine/unicode.h" #include "wine/unicode.h"
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04); 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) ...@@ -178,4 +180,10 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
return dst; 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 */ #endif /* WINCODECS_PRIVATE_H */
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