From: Santino Mazza <smazza@codeweavers.com> To introduce compare_rect_u. --- dlls/d2d1/tests/d2d1.c | 86 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index c01c6eefde4..afda90f1271 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -901,7 +901,7 @@ static BOOL compare_point(const D2D1_POINT_2F *point, float x, float y, unsigned && compare_float(point->y, y, ulps); } -static BOOL compare_rect(const D2D1_RECT_F *rect, float left, float top, float right, float bottom, unsigned int ulps) +static BOOL compare_rect_f(const D2D1_RECT_F *rect, float left, float top, float right, float bottom, unsigned int ulps) { return compare_float(rect->left, left, ulps) && compare_float(rect->top, top, ulps) @@ -3099,7 +3099,7 @@ static void test_image_brush(BOOL d3d11) matrix._11, matrix._12, matrix._21, matrix._22, matrix._31, matrix._32); ID2D1ImageBrush_GetSourceRectangle(brush, &rect); - match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); + match = compare_rect_f(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4219,7 +4219,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 123.0f, 456.0f, 123.0f, 456.0f, 0); + match = compare_rect_f(&rect, 123.0f, 456.0f, 123.0f, 456.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4228,7 +4228,7 @@ static void test_path_geometry(BOOL d3d11) scale_matrix(&matrix, 2.0f, 0.5f); hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 326.0f, 868.0f, 326.0f, 868.0f, 0); + match = compare_rect_f(&rect, 326.0f, 868.0f, 326.0f, 868.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4264,7 +4264,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); + match = compare_rect_f(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4275,7 +4275,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); + match = compare_rect_f(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4319,7 +4319,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 5.0f, 20.0f, 75.0f, 752.0f, 0); + match = compare_rect_f(&rect, 5.0f, 20.0f, 75.0f, 752.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4329,7 +4329,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 90.0f, 650.0f, 230.0f, 1016.0f, 0); + match = compare_rect_f(&rect, 90.0f, 650.0f, 230.0f, 1016.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4348,7 +4348,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 5.0f, 472.0f, 75.0f, 752.0f, 0); + match = compare_rect_f(&rect, 5.0f, 472.0f, 75.0f, 752.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4358,7 +4358,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 90.0f, 876.0f, 230.0f, 1016.0f, 0); + match = compare_rect_f(&rect, 90.0f, 876.0f, 230.0f, 1016.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4377,7 +4377,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4387,7 +4387,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4509,7 +4509,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 5.0f, 20.0f, 235.0f, 300.0f, 0); + match = compare_rect_f(&rect, 5.0f, 20.0f, 235.0f, 300.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4520,7 +4520,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1); + match = compare_rect_f(&rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4831,7 +4831,7 @@ static void test_path_geometry(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 20.0f, 20.0f, 180.0f, 180.0f, 0); + match = compare_rect_f(&rect, 20.0f, 20.0f, 180.0f, 180.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -4956,7 +4956,7 @@ static void test_rectangle_geometry(BOOL d3d11) hr = ID2D1Factory_CreateRectangleGeometry(ctx.factory, &rect, &geometry); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ID2D1RectangleGeometry_GetRect(geometry, &rect2); - match = compare_rect(&rect2, 0.0f, 0.0f, 0.0f, 0.0f, 0); + match = compare_rect_f(&rect2, 0.0f, 0.0f, 0.0f, 0.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect2.left, rect2.top, rect2.right, rect2.bottom); ID2D1RectangleGeometry_Release(geometry); @@ -4965,7 +4965,7 @@ static void test_rectangle_geometry(BOOL d3d11) hr = ID2D1Factory_CreateRectangleGeometry(ctx.factory, &rect, &geometry); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ID2D1RectangleGeometry_GetRect(geometry, &rect2); - match = compare_rect(&rect2, 50.0f, 0.0f, 40.0f, 100.0f, 0); + match = compare_rect_f(&rect2, 50.0f, 0.0f, 40.0f, 100.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect2.left, rect2.top, rect2.right, rect2.bottom); ID2D1RectangleGeometry_Release(geometry); @@ -4974,7 +4974,7 @@ static void test_rectangle_geometry(BOOL d3d11) hr = ID2D1Factory_CreateRectangleGeometry(ctx.factory, &rect, &geometry); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ID2D1RectangleGeometry_GetRect(geometry, &rect2); - match = compare_rect(&rect2, 0.0f, 100.0f, 40.0f, 50.0f, 0); + match = compare_rect_f(&rect2, 0.0f, 100.0f, 40.0f, 50.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect2.left, rect2.top, rect2.right, rect2.bottom); ID2D1RectangleGeometry_Release(geometry); @@ -4983,7 +4983,7 @@ static void test_rectangle_geometry(BOOL d3d11) hr = ID2D1Factory_CreateRectangleGeometry(ctx.factory, &rect, &geometry); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ID2D1RectangleGeometry_GetRect(geometry, &rect2); - match = compare_rect(&rect2, 50.0f, 100.0f, 40.0f, 50.0f, 0); + match = compare_rect_f(&rect2, 50.0f, 100.0f, 40.0f, 50.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect2.left, rect2.top, rect2.right, rect2.bottom); ID2D1RectangleGeometry_Release(geometry); @@ -5034,7 +5034,7 @@ static void test_rectangle_geometry(BOOL d3d11) /* Test GetBounds() and Simplify(). */ hr = ID2D1RectangleGeometry_GetBounds(geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f, 0); + match = compare_rect_f(&rect, 0.0f, 0.0f, 10.0f, 20.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5056,7 +5056,7 @@ static void test_rectangle_geometry(BOOL d3d11) rotate_matrix(&matrix, M_PI / -5.0f); hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 2.00000000e+01f, 1.82442951e+01f, 7.95376282e+01f, 6.23606796e+01f, 0); + match = compare_rect_f(&rect, 2.00000000e+01f, 1.82442951e+01f, 7.95376282e+01f, 6.23606796e+01f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5071,7 +5071,7 @@ static void test_rectangle_geometry(BOOL d3d11) scale_matrix(&matrix, 0.0f, 2.0f); hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 25.0f, 15.0f, 25.0f, 55.0f, 0); + match = compare_rect_f(&rect, 25.0f, 15.0f, 25.0f, 55.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5086,7 +5086,7 @@ static void test_rectangle_geometry(BOOL d3d11) scale_matrix(&matrix, 0.5f, 0.0f); hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 30.0f, 45.0f, 35.0f, 45.0f, 0); + match = compare_rect_f(&rect, 30.0f, 45.0f, 35.0f, 45.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5105,7 +5105,7 @@ static void test_rectangle_geometry(BOOL d3d11) hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1); + match = compare_rect_f(&rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5126,7 +5126,7 @@ static void test_rectangle_geometry(BOOL d3d11) scale_matrix(&matrix, 0.25f, 0.2f); hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 30.0f, 20.0f, 40.0f, 40.0f, 2); + match = compare_rect_f(&rect, 30.0f, 20.0f, 40.0f, 40.0f, 2); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5140,7 +5140,7 @@ static void test_rectangle_geometry(BOOL d3d11) scale_matrix(&matrix, 2.0f, 0.0f); hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1); + match = compare_rect_f(&rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -5154,7 +5154,7 @@ static void test_rectangle_geometry(BOOL d3d11) scale_matrix(&matrix, 0.0f, 0.5f); hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 0.00000000e+00f, 8.99519043e+01f, 0.00000000e+00, 1.36602539e+02f, 1); + match = compare_rect_f(&rect, 0.00000000e+00f, 8.99519043e+01f, 0.00000000e+00, 1.36602539e+02f, 1); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); geometry_sink_init(&sink); @@ -11588,7 +11588,7 @@ static void test_geometry_group(BOOL d3d11) set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f); hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, -2.0f, -2.0f, 1.0f, 2.0f, 0); + match = compare_rect_f(&rect, -2.0f, -2.0f, 1.0f, 2.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -11597,7 +11597,7 @@ static void test_geometry_group(BOOL d3d11) scale_matrix(&matrix, 2.0f, 0.5f); hr = ID2D1GeometryGroup_GetBounds(group, &matrix, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 76.0f, 639.0f, 82.0f, 641.0f, 0); + match = compare_rect_f(&rect, 76.0f, 639.0f, 82.0f, 641.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -11614,7 +11614,7 @@ static void test_geometry_group(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -11632,7 +11632,7 @@ static void test_geometry_group(BOOL d3d11) hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -11642,7 +11642,7 @@ static void test_geometry_group(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&rect, 160.0f, 240.0f, 240.0f, 720.0f, 0); + match = compare_rect_f(&rect, 160.0f, 240.0f, 240.0f, 720.0f, 0); ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom); @@ -13489,7 +13489,7 @@ static void test_effect_2d_affine(BOOL d3d11) todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); todo_wine - ok(compare_rect(&output_bounds, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom, 1), + ok(compare_rect_f(&output_bounds, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom, 1), "Got unexpected output bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n", output_bounds.left, output_bounds.top, output_bounds.right, output_bounds.bottom, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom); @@ -13628,7 +13628,7 @@ static void test_effect_crop(BOOL d3d11) todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); todo_wine - ok(compare_rect(&output_bounds, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom, 0), + ok(compare_rect_f(&output_bounds, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom, 0), "Got unexpected output bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n", output_bounds.left, output_bounds.top, output_bounds.right, output_bounds.bottom, test->bounds.left, test->bounds.top, test->bounds.right, test->bounds.bottom); @@ -14084,7 +14084,7 @@ static void test_effect_flood(BOOL d3d11) todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); todo_wine - ok(compare_rect(&bounds, -bound, -bound, bound, bound, 0), + ok(compare_rect_f(&bounds, -bound, -bound, bound, bound, 0), "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); @@ -15441,7 +15441,7 @@ static void test_image_bounds(BOOL d3d11) size = ID2D1Bitmap_GetSize(bitmap); hr = ID2D1DeviceContext_GetImageLocalBounds(context, (ID2D1Image *)bitmap, &bounds); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - ok(compare_rect(&bounds, 0.0f, 0.0f, size.width, size.height, 0), + ok(compare_rect_f(&bounds, 0.0f, 0.0f, size.width, size.height, 0), "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom, 0.0f, 0.0f, size.width, size.height); @@ -15450,7 +15450,7 @@ static void test_image_bounds(BOOL d3d11) ID2D1DeviceContext_SetDpi(context, dpi_x * 2.0f, dpi_y * 2.0f); hr = ID2D1DeviceContext_GetImageLocalBounds(context, (ID2D1Image *)bitmap, &bounds); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - ok(compare_rect(&bounds, 0.0f, 0.0f, size.width, size.height, 0), + ok(compare_rect_f(&bounds, 0.0f, 0.0f, size.width, size.height, 0), "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom, 0.0f, 0.0f, size.width, size.height); ID2D1DeviceContext_SetDpi(context, dpi_x, dpi_y); @@ -15461,7 +15461,7 @@ static void test_image_bounds(BOOL d3d11) ID2D1DeviceContext_SetUnitMode(context, D2D1_UNIT_MODE_PIXELS); hr = ID2D1DeviceContext_GetImageLocalBounds(context, (ID2D1Image *)bitmap, &bounds); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - ok(compare_rect(&bounds, 0.0f, 0.0f, test->pixel_size.width, test->pixel_size.height, 0), + ok(compare_rect_f(&bounds, 0.0f, 0.0f, test->pixel_size.width, test->pixel_size.height, 0), "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom, 0.0f, 0.0f, (float)test->pixel_size.width, (float)test->pixel_size.height); @@ -17808,7 +17808,7 @@ static void test_transformed_geometry(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) { - match = compare_rect(&bounds, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&bounds, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); } @@ -17819,7 +17819,7 @@ static void test_transformed_geometry(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) { - match = compare_rect(&bounds, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); + match = compare_rect_f(&bounds, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); } @@ -17827,7 +17827,7 @@ static void test_transformed_geometry(BOOL d3d11) set_rect(&bounds, 1.0f, 2.0f, 3.0f, 4.0f); hr = ID2D1PathGeometry_GetBounds(path_geometry, NULL, &bounds); ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&bounds, 1.0f, 2.0f, 3.0f, 4.0f, 0); + match = compare_rect_f(&bounds, 1.0f, 2.0f, 3.0f, 4.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); @@ -17865,14 +17865,14 @@ static void test_transformed_geometry(BOOL d3d11) set_rect(&bounds, 1.0f, 2.0f, 3.0f, 4.0f); hr = ID2D1TransformedGeometry_GetBounds(geometry, NULL, &bounds); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&bounds, 240.0f, 720.0f, 250.0f, 730.0f, 0); + match = compare_rect_f(&bounds, 240.0f, 720.0f, 250.0f, 730.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); set_rect(&bounds, 1.0f, 2.0f, 3.0f, 4.0f); hr = ID2D1TransformedGeometry_GetBounds(geometry2, NULL, &bounds); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - match = compare_rect(&bounds, 720.0f, 2160.0f, 730.0f, 2170.0f, 0); + match = compare_rect_f(&bounds, 720.0f, 2160.0f, 730.0f, 2170.0f, 0); ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n", bounds.left, bounds.top, bounds.right, bounds.bottom); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11249