Commit Graph

73 Commits

Author SHA1 Message Date
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
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 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 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
Michael Stefaniuc 6f22d67077 d2d1: Make use of the available ARRAY_SIZE macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:10 +02:00
Nikolay Sivov 463d1877ae d2d1: Fix GetGradientStops() when asked for more stops than collection has.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-25 19:48:52 +01:00
Nikolay Sivov aa55206626 d2d1: Fix a typo in traced error message parameter.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-01 14:38:26 +01:00
Nikolay Sivov 5f4bba4303 d2d1: Store gradient stop collection pointer for linear gradient brush.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-28 17:10:05 +02:00
Nikolay Sivov 0f44063006 d2d1: Support setting and getting back start and end point for linear gradient brush.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-28 17:10:02 +02:00
Nikolay Sivov e9da184bbd d2d1: Initial implementation of bitmap render target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 06:17:39 -07:00
Nikolay Sivov 27d5d4caf2 d2d1: Move brush creation helpers to common location.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-01 12:48:54 +09:00
Nikolay Sivov 39f2ed321d d2d1: Properly free brush data buffer is created from.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 23:56:40 +09:00
Henri Verbeet e6aa9f5041 d2d1: Add support for opacity brushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 00:24:22 +09:00
Henri Verbeet 64ccd138a2 d2d1: d2d_bitmap_brush_init() can't fail. 2015-08-13 15:04:08 +09:00
Henri Verbeet 7bdc1ef899 d2d1: Get rid of a FIXME in d2d_bitmap_brush_init(). 2015-08-13 15:04:06 +09:00
Henri Verbeet 7d801d67ed d2d1: Get rid of a FIXME in d2d_solid_color_brush_init().
All properties for solid color brushes are implemented.
2015-08-13 15:04:04 +09:00
Francois Gouget f8a7d6ed74 Assorted spelling fixes. 2015-08-07 23:50:48 +09:00
Henri Verbeet 91b9ce69b7 d2d1: Implement d2d_gradient_GetFactory(). 2015-08-03 10:56:53 +02:00
Henri Verbeet 4e50527c17 d2d1: Implement d2d_solid_color_brush_GetFactory(). 2015-08-03 10:56:51 +02:00
Henri Verbeet 8b893839bc d2d1: Implement d2d_linear_gradient_brush_GetFactory(). 2015-08-03 10:56:47 +02:00
Henri Verbeet 414d04e27d d2d1: Implement d2d_bitmap_brush_GetFactory(). 2015-08-03 10:56:44 +02:00
Henri Verbeet 52c412492f d2d1: Bitmap values are always premultiplied in practice.
Since creating bitmaps with D2D1_ALPHA_MODE_UNKNOWN or
D2D1_ALPHA_MODE_STRAIGHT is not possible, and D2D1_ALPHA_MODE_IGNORE
behaves as if alpha == 1.0f.
2015-07-30 11:39:46 +02:00
Henri Verbeet c4503779bb d2d1: Take the bitmap's alpha mode into account in bitmap brushes. 2015-07-29 21:44:02 +02:00
Henri Verbeet d742887b7f d2d1: Implement d2d_bitmap_brush_SetBitmap(). 2015-07-29 21:44:02 +02:00
Henri Verbeet 3b400cad34 d2d1: Fix the bitmap DPI scale for bitmap brushes. 2015-07-21 16:33:23 +02:00
Henri Verbeet b33786ce6d d2d1: Implement initial support for drawing bezier curves. 2015-07-20 11:50:20 +02:00
Henri Verbeet 3bb382aabb d2d1: Introduce a separate function to construct pixel shader constant buffers for brushes. 2015-07-14 23:27:21 +09:00
Henri Verbeet 1f4e37659c d2d1: Also bind the pixel shader and blend state in d2d_brush_bind_resources(). 2015-07-14 23:27:21 +09:00
Henri Verbeet abc84588d2 d2d1: Implement d2d_bitmap_brush_GetExtendModeY(). 2015-04-28 15:34:10 +09:00
Henri Verbeet 0a02f346f6 d2d1: Implement d2d_bitmap_brush_SetExtendModeY(). 2015-04-28 15:34:08 +09:00
Henri Verbeet b940f2fd9e d2d1: Implement d2d_bitmap_brush_GetExtendModeX(). 2015-04-28 15:34:06 +09:00
Henri Verbeet 21a4a10879 d2d1: Implement d2d_bitmap_brush_SetExtendModeX(). 2015-04-28 15:34:03 +09:00