d2d1: Added a helper to trace D2D1_RECT_F arguments.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-07-10 19:02:18 +03:00 committed by Alexandre Julliard
parent 26c2745266
commit 9fe40c24f8
7 changed files with 57 additions and 51 deletions

View File

@ -234,8 +234,8 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_DrawRectangle(ID2D1Bitmap
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, rect, brush, stroke_width, stroke_style);
TRACE("iface %p, rect %s, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, debug_d2d_rect_f(rect), brush, stroke_width, stroke_style);
ID2D1RenderTarget_DrawRectangle(render_target->dxgi_target, rect, brush, stroke_width, stroke_style);
}
@ -245,7 +245,7 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_FillRectangle(ID2D1Bitmap
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p.\n", iface, rect, brush);
TRACE("iface %p, rect %s, brush %p.\n", iface, debug_d2d_rect_f(rect), brush);
ID2D1RenderTarget_FillRectangle(render_target->dxgi_target, rect, brush);
}
@ -329,8 +329,8 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_FillOpacityMask(ID2D1Bitm
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %p, src_rect %p.\n",
iface, mask, brush, content, dst_rect, src_rect);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s.\n",
iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_FillOpacityMask(render_target->dxgi_target,
mask, brush, content, dst_rect, src_rect);
@ -342,8 +342,8 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_DrawBitmap(ID2D1BitmapRen
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, bitmap %p, dst_rect %p, opacity %.8e, interpolation_mode %#x, src_rect %p.\n",
iface, bitmap, dst_rect, opacity, interpolation_mode, src_rect);
TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n",
iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_DrawBitmap(render_target->dxgi_target,
bitmap, dst_rect, opacity, interpolation_mode, src_rect);
@ -355,9 +355,9 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_DrawText(ID2D1BitmapRende
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %s, "
"brush %p, options %#x, measuring_mode %#x.\n",
iface, debugstr_wn(string, string_len), string_len, text_format, layout_rect,
iface, debugstr_wn(string, string_len), string_len, text_format, debug_d2d_rect_f(layout_rect),
brush, options, measuring_mode);
ID2D1RenderTarget_DrawText(render_target->dxgi_target, string, string_len,
@ -541,7 +541,7 @@ static void STDMETHODCALLTYPE d2d_bitmap_render_target_PushAxisAlignedClip(ID2D1
{
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
TRACE("iface %p, clip_rect %p, antialias_mode %#x.\n", iface, clip_rect, antialias_mode);
TRACE("iface %p, clip_rect %s, antialias_mode %#x.\n", iface, debug_d2d_rect_f(clip_rect), antialias_mode);
ID2D1RenderTarget_PushAxisAlignedClip(render_target->dxgi_target, clip_rect, antialias_mode);
}

View File

@ -465,4 +465,10 @@ static inline void d2d_rect_expand(D2D1_RECT_F *dst, const D2D1_POINT_2F *point)
dst->bottom = point->y;
}
static inline const char *debug_d2d_rect_f(const D2D1_RECT_F *rect)
{
if (!rect) return "(null)";
return wine_dbg_sprintf("(%.8e,%.8e)-(%.8e,%.8e)", rect->left, rect->top, rect->right, rect->bottom );
}
#endif /* __WINE_D2D1_PRIVATE_H */

View File

@ -252,8 +252,8 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_DrawRectangle(ID2D1DCRenderTa
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, rect, brush, stroke_width, stroke_style);
TRACE("iface %p, rect %s, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, debug_d2d_rect_f(rect), brush, stroke_width, stroke_style);
ID2D1RenderTarget_DrawRectangle(render_target->dxgi_target, rect, brush, stroke_width, stroke_style);
}
@ -263,7 +263,7 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_FillRectangle(ID2D1DCRenderTa
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p.\n", iface, rect, brush);
TRACE("iface %p, rect %s, brush %p.\n", iface, debug_d2d_rect_f(rect), brush);
ID2D1RenderTarget_FillRectangle(render_target->dxgi_target, rect, brush);
}
@ -347,8 +347,8 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_FillOpacityMask(ID2D1DCRender
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %p, src_rect %p.\n",
iface, mask, brush, content, dst_rect, src_rect);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s.\n",
iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_FillOpacityMask(render_target->dxgi_target,
mask, brush, content, dst_rect, src_rect);
@ -360,8 +360,8 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_DrawBitmap(ID2D1DCRenderTarge
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, bitmap %p, dst_rect %p, opacity %.8e, interpolation_mode %#x, src_rect %p.\n",
iface, bitmap, dst_rect, opacity, interpolation_mode, src_rect);
TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n",
iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_DrawBitmap(render_target->dxgi_target,
bitmap, dst_rect, opacity, interpolation_mode, src_rect);
@ -373,9 +373,9 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_DrawText(ID2D1DCRenderTarget
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %s, "
"brush %p, options %#x, measuring_mode %#x.\n",
iface, debugstr_wn(string, string_len), string_len, text_format, layout_rect,
iface, debugstr_wn(string, string_len), string_len, text_format, debug_d2d_rect_f(layout_rect),
brush, options, measuring_mode);
ID2D1RenderTarget_DrawText(render_target->dxgi_target, string, string_len,
@ -559,7 +559,7 @@ static void STDMETHODCALLTYPE d2d_dc_render_target_PushAxisAlignedClip(ID2D1DCRe
{
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
TRACE("iface %p, clip_rect %p, antialias_mode %#x.\n", iface, clip_rect, antialias_mode);
TRACE("iface %p, clip_rect %s, antialias_mode %#x.\n", iface, debug_d2d_rect_f(clip_rect), antialias_mode);
ID2D1RenderTarget_PushAxisAlignedClip(render_target->dxgi_target, clip_rect, antialias_mode);
}

View File

@ -128,7 +128,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
struct d2d_geometry *object;
HRESULT hr;
TRACE("iface %p, rect %p, geometry %p.\n", iface, rect, geometry);
TRACE("iface %p, rect %s, geometry %p.\n", iface, debug_d2d_rect_f(rect), geometry);
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
return E_OUTOFMEMORY;

View File

@ -241,8 +241,8 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_DrawRectangle(ID2D1HwndRend
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, rect, brush, stroke_width, stroke_style);
TRACE("iface %p, rect %s, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, debug_d2d_rect_f(rect), brush, stroke_width, stroke_style);
ID2D1RenderTarget_DrawRectangle(render_target->dxgi_target, rect, brush, stroke_width, stroke_style);
}
@ -252,7 +252,7 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_FillRectangle(ID2D1HwndRend
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, rect %p, brush %p.\n", iface, rect, brush);
TRACE("iface %p, rect %s, brush %p.\n", iface, debug_d2d_rect_f(rect), brush);
ID2D1RenderTarget_FillRectangle(render_target->dxgi_target, rect, brush);
}
@ -336,8 +336,8 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_FillOpacityMask(ID2D1HwndRe
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %p, src_rect %p.\n",
iface, mask, brush, content, dst_rect, src_rect);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s.\n",
iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_FillOpacityMask(render_target->dxgi_target,
mask, brush, content, dst_rect, src_rect);
@ -349,8 +349,8 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_DrawBitmap(ID2D1HwndRenderT
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, bitmap %p, dst_rect %p, opacity %.8e, interpolation_mode %#x, src_rect %p.\n",
iface, bitmap, dst_rect, opacity, interpolation_mode, src_rect);
TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n",
iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_DrawBitmap(render_target->dxgi_target,
bitmap, dst_rect, opacity, interpolation_mode, src_rect);
@ -362,9 +362,9 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_DrawText(ID2D1HwndRenderTar
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %s, "
"brush %p, options %#x, measuring_mode %#x.\n",
iface, debugstr_wn(string, string_len), string_len, text_format, layout_rect,
iface, debugstr_wn(string, string_len), string_len, text_format, debug_d2d_rect_f(layout_rect),
brush, options, measuring_mode);
ID2D1RenderTarget_DrawText(render_target->dxgi_target, string, string_len,
@ -551,7 +551,7 @@ static void STDMETHODCALLTYPE d2d_hwnd_render_target_PushAxisAlignedClip(ID2D1Hw
{
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
TRACE("iface %p, clip_rect %p, antialias_mode %#x.\n", iface, clip_rect, antialias_mode);
TRACE("iface %p, clip_rect %s, antialias_mode %#x.\n", iface, debug_d2d_rect_f(clip_rect), antialias_mode);
ID2D1RenderTarget_PushAxisAlignedClip(render_target->dxgi_target, clip_rect, antialias_mode);
}

View File

@ -514,8 +514,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawRectangle(ID2D1RenderTar
ID2D1RectangleGeometry *geometry;
HRESULT hr;
TRACE("iface %p, rect %p, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, rect, brush, stroke_width, stroke_style);
TRACE("iface %p, rect %s, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, debug_d2d_rect_f(rect), brush, stroke_width, stroke_style);
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{
@ -534,7 +534,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_FillRectangle(ID2D1RenderTar
ID2D1RectangleGeometry *geometry;
HRESULT hr;
TRACE("iface %p, rect %p, brush %p.\n", iface, rect, brush);
TRACE("iface %p, rect %s, brush %p.\n", iface, debug_d2d_rect_f(rect), brush);
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{
@ -917,8 +917,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_FillOpacityMask(ID2D1RenderT
ID2D1Bitmap *mask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content,
const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect)
{
FIXME("iface %p, mask %p, brush %p, content %#x, dst_rect %p, src_rect %p stub!\n",
iface, mask, brush, content, dst_rect, src_rect);
FIXME("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s stub!\n",
iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect));
}
static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawBitmap(ID2D1RenderTarget *iface,
@ -931,8 +931,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawBitmap(ID2D1RenderTarget
D2D1_RECT_F s, d;
HRESULT hr;
TRACE("iface %p, bitmap %p, dst_rect %p, opacity %.8e, interpolation_mode %#x, src_rect %p.\n",
iface, bitmap, dst_rect, opacity, interpolation_mode, src_rect);
TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n",
iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
if (src_rect)
{
@ -993,9 +993,9 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawText(ID2D1RenderTarget *
D2D1_POINT_2F origin;
HRESULT hr;
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %s, "
"brush %p, options %#x, measuring_mode %#x.\n",
iface, debugstr_wn(string, string_len), string_len, text_format, layout_rect,
iface, debugstr_wn(string, string_len), string_len, text_format, debug_d2d_rect_f(layout_rect),
brush, options, measuring_mode);
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
@ -1408,7 +1408,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_PushAxisAlignedClip(ID2D1Ren
float x_scale, y_scale;
D2D1_POINT_2F point;
TRACE("iface %p, clip_rect %p, antialias_mode %#x.\n", iface, clip_rect, antialias_mode);
TRACE("iface %p, clip_rect %s, antialias_mode %#x.\n", iface, debug_d2d_rect_f(clip_rect), antialias_mode);
if (antialias_mode != D2D1_ANTIALIAS_MODE_ALIASED)
FIXME("Ignoring antialias_mode %#x.\n", antialias_mode);

View File

@ -302,8 +302,8 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_DrawRectangle(ID2D1RenderTar
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, rect %p, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, rect, brush, stroke_width, stroke_style);
TRACE("iface %p, rect %s, brush %p, stroke_width %.8e, stroke_style %p.\n",
iface, debug_d2d_rect_f(rect), brush, stroke_width, stroke_style);
ID2D1RenderTarget_DrawRectangle(render_target->dxgi_target, rect, brush, stroke_width, stroke_style);
}
@ -313,7 +313,7 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_FillRectangle(ID2D1RenderTar
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, rect %p, brush %p.\n", iface, rect, brush);
TRACE("iface %p, rect %s, brush %p.\n", iface, debug_d2d_rect_f(rect), brush);
ID2D1RenderTarget_FillRectangle(render_target->dxgi_target, rect, brush);
}
@ -397,8 +397,8 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_FillOpacityMask(ID2D1RenderT
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %p, src_rect %p.\n",
iface, mask, brush, content, dst_rect, src_rect);
TRACE("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s.\n",
iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_FillOpacityMask(render_target->dxgi_target,
mask, brush, content, dst_rect, src_rect);
@ -410,8 +410,8 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_DrawBitmap(ID2D1RenderTarget
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, bitmap %p, dst_rect %p, opacity %.8e, interpolation_mode %#x, src_rect %p.\n",
iface, bitmap, dst_rect, opacity, interpolation_mode, src_rect);
TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n",
iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
ID2D1RenderTarget_DrawBitmap(render_target->dxgi_target,
bitmap, dst_rect, opacity, interpolation_mode, src_rect);
@ -423,9 +423,9 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_DrawText(ID2D1RenderTarget *
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
TRACE("iface %p, string %s, string_len %u, text_format %p, layout_rect %s, "
"brush %p, options %#x, measuring_mode %#x.\n",
iface, debugstr_wn(string, string_len), string_len, text_format, layout_rect,
iface, debugstr_wn(string, string_len), string_len, text_format, debug_d2d_rect_f(layout_rect),
brush, options, measuring_mode);
ID2D1RenderTarget_DrawText(render_target->dxgi_target, string, string_len,
@ -609,7 +609,7 @@ static void STDMETHODCALLTYPE d2d_wic_render_target_PushAxisAlignedClip(ID2D1Ren
{
struct d2d_wic_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
TRACE("iface %p, clip_rect %p, antialias_mode %#x.\n", iface, clip_rect, antialias_mode);
TRACE("iface %p, clip_rect %s, antialias_mode %#x.\n", iface, debug_d2d_rect_f(clip_rect), antialias_mode);
ID2D1RenderTarget_PushAxisAlignedClip(render_target->dxgi_target, clip_rect, antialias_mode);
}