Commit Graph

309 Commits

Author SHA1 Message Date
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Michael Stefaniuc 7b5668a6e7 include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-25 12:09:17 +02:00
Nikolay Sivov b756609894 d2d1: Add ID2D1Bitmap1 stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-23 17:33:33 +02:00
Nikolay Sivov e202a9ea25 d2d1/tests: Add a simple test for creating d2d devices.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 10:51:29 +02:00
Lucian Poston 02603467e9 d2d1: Add ID2D1Device stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 10:51:17 +02:00
Józef Kucia 372451253c d2d1/tests: Adjust expected value for linear brush test.
Fixes the test on Linux with Nvidia.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-15 17:29:26 +02:00
Giovanni Mascellani abbffd2ee2 d2d1: Fix outline join drawing.
Calling d2d_outline_vertex_set(x, y, 0, 0, 0, 0) causes a normalize() to
be invoked with a zero vector in the vertex shader
vs_code_bezier_outline. This gives rise to an undefinite result, that in
some cases causes the join triangles to be dropped.

Tested on Debian unstable.

Signed-off-by: Giovanni Mascellani <g.mascellani@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 09:52:36 +02:00
Henri Verbeet fa4d5b6151 d2d1: Replace d2d_calloc() with a global heap_calloc() helper.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:49 +01:00
Henri Verbeet d9f4390488 d2d1: Use d2d_array_reserve() in d2d_clip_stack_push().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 17:54:55 +01:00
Henri Verbeet fdaa6d8e2a d2d1: Introduce a helper function to allocate arrays.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 17:54:55 +01:00
Henri Verbeet 6d8ebf1d1a d2d1: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:06 +01:00
Henri Verbeet 8247c13aae d2d1: Introduce a registry key to limit the maximum supported factory version.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:46 +01:00
Lucian Poston 9d9fbc0e4a d2d1: Implement ID2D1Factory1.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:46 +01:00
Nikolay Sivov 0fa7071608 d2d1/tests: A test to show that DC is validated on BindDC().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-15 18:55:41 +01:00
Henri Verbeet 1ddbab3f27 d2d1/tests: Introduce an ARRAY_SIZE macro.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-13 20:15:38 +01:00
Nikolay Sivov 4e610f059d d2d1: Respond to ID2D1Image query.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 15:56:54 +01:00
Henri Verbeet 24dc5c7409 d2d1: Implement radial gradient brushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:51 +02:00
Henri Verbeet 370cbf488a d2d1: Implement d2d_radial_gradient_brush_SetRadiusY().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:37 +02:00
Henri Verbeet ac4db5ebda d2d1: Implement d2d_radial_gradient_brush_SetRadiusX().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:34 +02:00
Henri Verbeet f92b291f24 d2d1: Implement d2d_radial_gradient_brush_GetRadiusY().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:28 +02:00
Henri Verbeet 8dd021fd72 d2d1: Implement d2d_radial_gradient_brush_GetRadiusX().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:21 +02:00
Henri Verbeet 48dfe437f9 d2d1: Implement d2d_radial_gradient_brush_GetGradientStopCollection().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-27 09:55:53 +02:00
Henri Verbeet 5aef3d6352 d2d1: Implement d2d_radial_gradient_brush_SetGradientOriginOffset().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-27 09:55:51 +02:00
Henri Verbeet 2148545e25 d2d1: Implement d2d_radial_gradient_brush_GetGradientOriginOffset().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-27 09:55:49 +02:00
Henri Verbeet 85c4419859 d2d1: Implement d2d_radial_gradient_brush_SetCenter().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-27 09:55:47 +02:00
Henri Verbeet 4482324455 d2d1: Implement d2d_radial_gradient_brush_GetCenter().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-27 09:55:46 +02:00
Henri Verbeet 7c430c5ce0 d2d1: Implement d2d_d3d_render_target_CreateRadialGradientBrush().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 21:24:08 +02:00
Henri Verbeet e29e627064 d2d1: Implement linear gradient brushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 21:24:08 +02:00
Henri Verbeet 24814f8f4a d2d1: Create shader resource views for gradient stop collections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 21:24:08 +02:00
Henri Verbeet c1cba92cc0 d2d1: Implement d2d_linear_gradient_brush_GetOpacity().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 21:24:08 +02:00
Henri Verbeet aa7d5a8414 d2d1: Implement d2d_linear_gradient_brush_SetOpacity().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 21:24:08 +02:00
Henri Verbeet 119f84099b d2d1: Use the "world" position instead of the render target position in the pixel shader.
This slightly simplifies the implementation of bitmap brushes, since the
render target transformation no longer needs to be undone. More importantly,
it does the same for gradient brushes.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 11:04:39 +02:00
Henri Verbeet f55960576d d2d1: Unify the outline and fill pixel shaders.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 11:04:37 +02:00
Henri Verbeet 2fafd92d88 d2d1: Unify the various brush pixel shaders.
Branches inside shaders aren't free, but in the long term avoiding switching
between shaders is probably worth it for D2D. As an added benefit, this makes
bitmap brushes and opacity brushes work with bezier geometry.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 11:03:09 +02:00
Henri Verbeet 49019368c2 d2d1/tests: Add some bitmap brush tests for skew transformations and transformed geometry.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 11:02:37 +02:00
Henri Verbeet 2a770ae741 d2d1/tests: Introduce get_surface_readback().
As in the Direct3D tests.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 11:02:34 +02:00
Nikolay Sivov e6c18792f1 d2d1: Improve figure bounds updating for quadratic beziers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 14:15:58 +02:00
Nikolay Sivov 00fea0298b d2d1: Implement GetBounds() for path geometries.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Nikolay Sivov dcccaaf7f3 d2d1: Use better bezier segment bounds approximation when updating figure bounds.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Nikolay Sivov 38d314ba92 d2d1: Use 8bpp text bitmaps for grayscale mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 17:52:16 +02:00
Nikolay Sivov 0a315ba065 d2d1: Fix rounding when setting scissor rectangle.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-30 16:28:56 +02:00
Nikolay Sivov 7316c96239 d2d1: Pass inline object effect through rendering context.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 17:46:20 +02:00
Henri Verbeet 2187a1edb3 d2d1: Split overlapping bezier control triangles.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:04 +09:00
Henri Verbeet 3895f07c4b d2d1: Use segment indices in d2d_geometry_resolve_beziers().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:02 +09:00
Henri Verbeet 00fafb27e3 d2d1: Implement bezier/bezier intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:59 +09:00
Henri Verbeet a4f23ea148 d2d1: Implement bezier/line intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:57 +09:00
Henri Verbeet a5f02132d3 d2d1: Introduce a separate function for calculating line/line intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:55 +09:00
Henri Verbeet 01d4767aed d2d1/tests: Add a test for bezier intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:53 +09:00
Henri Verbeet 0ede13e1df d2d1: Return S_OK on success in d2d_geometry_resolve_beziers().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:50 +09:00
Nikolay Sivov b9a03b70af d2d1: Fix trace message typo.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:56 +09:00