Commit Graph

171 Commits

Author SHA1 Message Date
Ziqing Hui 36c80777f1 d2d1/tests: Add tests for crop effect.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Ziqing Hui 57d5314ad6 d2d1/tests: Add tests for 2D affine effect.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Henri Verbeet 8718a23b2e d2d1: Check the vertex count again after duplicate removal in d2d_path_geometry_triangulate().
As the test shows, we can create geometries that have less than two vertices
after eliminating duplicates. Calling d2d_cdt_triangulate() on those would
lead to infinite recursion. In principle we could now get rid of the original
vertex count check, but it seems cheap enough that it's worth keeping in order
to avoid some unnecessary work in the somewhat more common case that we have
less than three vertices before duplicate removal.

Based on a patch by Changsheng Chen.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Francois Gouget a3efdeeb17 d2d1/tests: Some languages need a longer buffer for property display names.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Ziqing Hui a52b58473c d2d1: Add D2D1Crop.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:50 +02:00
Ziqing Hui 77930f1fe2 d2d1: Implement d2d_effect_GetValue().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Ziqing Hui a60e45b64b d2d1: Implement d2d_effect_SetInputCount().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Ziqing Hui 8bf2603838 d2d1: Implement d2d_effect_GetInput().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:05:38 +02:00
Ziqing Hui b2b73446e5 d2d1: Add a properties list for builtin effects.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:05:26 +02:00
Ziqing Hui d6fe15b8f5 d2d1: Implement d2d_effect_GetInputCount().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:05:23 +02:00
Ziqing Hui 08c73bb85f d2d1/tests: Add tests for effect inputs.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:57:18 +02:00
Ziqing Hui d6f3e0ec6f d2d1/tests: Add failure tests for ID2D1Effect_GetValue().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:31 +02:00
Ziqing Hui 5ee5d7bbf3 d2d1/tests: Add tests for standard effect properties.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Ziqing Hui c6a40ff64f d2d1: Implement d2d_effect_GetOutput().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:51:21 +02:00
Ziqing Hui 0408225fd6 d2d1: Add a ID2D1Image interface for effects.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:51:19 +02:00
Ziqing Hui f41d2d7b44 d2d1/tests: Add an effects test.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:51:16 +02:00
Rémi Bernon e6603ae4e7 d2d1: Remove unused D3D10 interfaces.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49395
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Nikolay Sivov 27fed4a520 d2d1: Implement ID2D1Multithread.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:18 +02:00
Nikolay Sivov 1cd678d6a0 d2d1: Implement d2d_geometry_group_GetBounds().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50411
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 20:35:26 +01:00
Giovanni Mascellani 2cb681e740 d2d1: Implement D2D1ConvertColorSpace().
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-05 17:58:57 +01:00
Nikolay Sivov 33e0d15d17 d2d1/tests: Add return value test (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 20:39:39 +01:00
Michael Stefaniuc 3e1bb7f727 d2d1/tests: Remove superfluous cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 20:53:49 +01:00
Rémi Bernon 00401d2278 d2d1/tests: Run most tests on d3d11 as well.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:47 +01:00
Rémi Bernon 691744cac6 d2d1/tests: Store an IDXGIDevice interface instead of an ID3D10Device1 interface in struct d2d1_test_context.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:43 +01:00
Rémi Bernon aff25e42b1 d2d1/tests: Pass a d2d1_test_context structure get_surface_readback().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:39 +01:00
Rémi Bernon 1b2e27fe49 d2d1/tests: Pass a d2d1_test_context structure to compare_figure().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:36 +01:00
Rémi Bernon f5bb97d28f d2d1/tests: Pass a d2d1_test_context structure to compare_surface().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:31 +01:00
Rémi Bernon aab3f4b7fe d2d1/tests: Store the resource data pointer and row-pitch directly in struct resource_readback.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:27 +01:00
Rémi Bernon 85f3ba90e5 d2d1/tests: Create a Direct2D render target in init_test_context_().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:22 +01:00
Rémi Bernon 1a12eb08be d2d1/tests: Retrieve the swapchain back-buffer in init_test_context_().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:16 +01:00
Rémi Bernon 7b312cd1be d2d1/tests: Create a swapchain in init_test_context_().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:11 +01:00
Rémi Bernon acd9b6a45a d2d1/tests: Create a window in init_test_context_().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:03:05 +01:00
Rémi Bernon 02634c3d75 d2d1/tests: Introduce init_test_context().
Analogous to the d3d11 tests.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:02:59 +01:00
Rémi Bernon babd036a79 d2d1/tests: Check for d2d1 math functions presence.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:02:52 +01:00
Jactry Zeng c19fc01d36 d2d1: Partially implement d2d_device_context_DrawImage().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:02:45 +01:00
Jactry Zeng e2a7ee33d0 d2d1: Skip empty source rectangle for ID2D1RenderTarget_DrawBitmap().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:02:42 +01:00
Jactry Zeng 757ce04917 d2d1: Limit source rectangle to the actual size for ID2D1RenderTarget_DrawBitmap().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 21:02:39 +01:00
Giovanni Mascellani 4905921fa5 d2d1: Implement D2D1Vec3Length().
Signed-off-by: Giovanni Mascellani <wine@mascellani.eu>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:25:30 +01:00
Giovanni Mascellani 9cf8fab952 d2d1: Implement D2D1Tan().
Signed-off-by: Giovanni Mascellani <wine@mascellani.eu>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:25:26 +01:00
Giovanni Mascellani 4f6bd00a84 d2d1: Implement D2D1SinCos().
Signed-off-by: Giovanni Mascellani <wine@mascellani.eu>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:25:23 +01:00
Michael Stefaniuc 141ff5f4f5 d2d1/tests:Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 15:53:00 +02:00
Nikolay Sivov f7f8006064 d2d1: Implement D2D1CreateDevice().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 18:35:01 +02:00
Biswapriyo Nath 48020f4846 include: Add missing structures in dcommon.idl.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 22:17:37 +02:00
Henri Verbeet 1cb9a31bdf d2d1/tests: Introduce compare_uint().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:07 +02:00
Zebediah Figura 7ce3b65f1e d2d1/tests: Adjust a color to prevent test failures.
Different drivers may produce either #ff7f00 or #ff8000 here, both on Windows
and Linux.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 21:30:34 +01:00
Zebediah Figura ef0f2c7f00 d2d1: Support GUID_WICPixelFormat32bppPRGBA.
Needed by Visio 2016.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Giovanni Mascellani a6bf2c429e d2d1: Implement ellipse and rounded rectangle filling with arcs.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 18:53:37 +01:00
Giovanni Mascellani 722469254d d2d1: Ensure that hollow figures do not impact geometry bounds.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:30 +01:00
Giovanni Mascellani fdd7604d72 d2d1/tests: Test that hollow figures do not impact geometry bounds.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:28 +01:00
Giovanni Mascellani b728b2ff5f d2d1: Do not fill hollow figures.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:26 +01:00