Commit Graph

394 Commits

Author SHA1 Message Date
Sergio Gómez Del Real c20285218b gdi32/dibdrv: Clip segment points to dib rect in wide_line_segment().
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Daniel Lehman 3b8fde3f08 gdi32: Fix memory leak (Valgrind).
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-20 15:34:01 +01:00
Byeongsik Jeon 649dd1292d gdi32: Support the gamma correction for the subpixel rendering.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 22:36:43 +02:00
Michael Stefaniuc fb7a8d92fd gdi32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 12:46:18 +02:00
Michael Stefaniuc 02b7f00a11 gdi32: Avoid a variable holding an ARRAY_SIZE.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 12:46:14 +02:00
Alexandre Julliard 766287ad6a server: Return the surface rect as top clipping rect.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-11 15:45:11 +02:00
Alexandre Julliard 0188dc7da8 gdi32: Clip the computed region to the DIB rectangle in PolyPolygon().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:52 +02:00
Alexandre Julliard 737a113c10 gdi32: Add a helper function to retrieve the DIB rectangle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:52 +02:00
Roderick Colenbrander 3de61a9dd9 winevulkan: Define vulkan driver interface.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:16 +01:00
Huw Davies 82973cfbd1 gdi32: Allocate the bitmap bits during CreateBitmapIndirect() to catch out-of-memory errors.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 11:33:39 +01:00
Huw Davies 1def41b903 gdi32: Don't bother using the return value of HeapFree().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 12:21:09 +01:00
Alexandre Julliard 90273a6e81 gdi32: Fix clipping to the DIB rectangle in GetPixel().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 16:29:03 +01:00
Alexandre Julliard 17dffaac7d opengl32: Get WGL function definitions from the XML files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 10:06:10 +02:00
Alexandre Julliard 66507e86c0 gdi32: Do not dither non-extended wide pens.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:14:30 +02:00
Alexandre Julliard 1c56b3b516 gdi32: Use the correct brush origin when the blit operation requires an intermediate bitmap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:10:45 +02:00
Alexandre Julliard 97a9db43d2 gdi32: Pass the brush origin explicitly to the brush backend functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:08:41 +02:00
Alexandre Julliard 80ae5c968e gdi32: Always dither brush when painting to a 1-bpp device.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 10:05:55 +02:00
Huw Davies 8e9af9e016 gdi32: Respect the rop mode in SetPixel.
Based on a patch by Tim Worthington.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Huw Davies 46e6ee48f3 gdi32: Add a helper to fill rectangles with a given pixel.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Sebastian Lackner f625707ffc configure: Support for recent versions of OSMesa.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 19:21:49 +02:00
Alexandre Julliard 059170208a gdi32: Map the black and white entries to the DIB color table after dithering.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 20:12:50 +01:00
Alexandre Julliard c54b667e25 gdi32: Add support for DIBINDEX colors in 1-bpp blits.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:29:51 +01:00
Alexandre Julliard 89d31e42fc gdi32: Fix color conversion when blitting to 1-bpp by matching pixels instead of color values.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:07:46 +01:00
Alexandre Julliard 71d2d4ee96 gdi32: Add more helper functions for RGB to pixel conversions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 20:57:41 +01:00
Huw Davies 0bec2f7965 gdi32: Calculate the stride from the image size.
This allows bitmaps to be created by D3DKMTCreateDCFromMemory() which have more freedom
in their choice of stride.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:28 +01:00
Huw Davies 04f8ecd956 gdi32: Check that ExtFloodFill()'s initial co-ordinates lie within the dib.
It might seem more natural to move this check inside is_interior(), but
this would slow down the unclipped case.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-29 22:40:06 +09:00
Huw Davies c429c595e8 gdi32: Explicitly write out the rops for copy_rect_1().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:07 +09:00
Huw Davies efd6292fae gdi32: Split out the various offset cases for copy_rect_1() into separate functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:05 +09:00
Huw Davies e1ce79ec94 gdi32: Explicitly write out the rops for mask_rect_32().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:03 +09:00
Huw Davies 4b39c7b944 gdi32: Explicitly write out the rops for copy_rect_32().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:00 +09:00
Huw Davies 1d0e25e600 gdi32: Move the outer loop into separate functions for each direction.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:58:58 +09:00
Huw Davies a875e3c6ab gdi32: Unroll the start- and end-of-line loops.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 45b848ccd1 gdi32: Handle the case of a partial source byte separately.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 6c7ed1214c gdi32: Eliminate a masking operation by generating a larger colour table.
This helps significantly for large rectangles.

This is only done for the 32-bpp case as typically the lower bit
depths would more likely be used to draw small icons and the like,
where the extra fixed cost of this optimization will potentially
outweigh the savings.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 67520ebaf5 gdi32: Pass a DC pointer to get_gdi_flat_path().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies 22202eae59 gdi32: Use a buffer on the stack if the number of points is small.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:32 +09:00
Huw Davies 5118d1312c gdi32: Access a few more properties directly from the DC in the dib driver.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:09 +09:00
Huw Davies d8e353f99f gdi32: Pass a DC pointer to get_pixel_color().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:09 +09:00
Huw Davies cf386b8b64 gdi32: Pass a DC pointer to get_mono_dc_colors().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:08 +09:00
Huw Davies 9efe66a83a gdi32: Use lp_to_dp() instead of LPtoDP() in the dib driver.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:10 +09:00
Huw Davies 7fa6dfecc9 gdi32: Pass a DC pointer to get_device_rect() to avoid accesses via the handle.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:09 +09:00
Huw Davies 36a0bb0f52 gdi32: Avoid unnecessary calls to get_dc_ptr().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:09 +09:00
Huw Davies 778faedbae gdi32: Copy 1-bpp pixels one byte at a time.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 19:56:38 +09:00
Huw Davies 54ec86021a gdi32: Change get_gdi_flat_path() to return an opaque path pointer.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:26:10 +09:00
Huw Davies a8044bebe8 gdi32: Add a mask_rect primitive for use when the src is 1bpp.
This essentially combines the format conversion with a copy_rect.

It cannot be used when stretching, since stretching of 1bpp is
slightly special.  Similarly, it cannot be used if the dst is also
1bpp (hence there is no mask_rect_1) or if the rop involves the brush.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +09:00
Huw Davies f7b6a7d77a gdi32: Precompute the destination colours for sources with a colour table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Huw Davies 7fd44a511f gdi32: Use a binary search to generate the clipped rects.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Alexandre Julliard 7cfcd23878 gdi32: Take the transform rotation into account to compute pen width.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:20 +09:00
Alexandre Julliard b5cf73edd9 gdi32: Implement FillPath, StrokeAndFillPath and StrokePath in the DIB driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:20 +09:00
Andrey Gusev 9a80284e1a gdi32: Fix a typo in a pointer name in primitive_funcs.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-19 23:42:23 +09:00