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
Henri Verbeet
0a41694b53
gdi32: Implement DC creation from pre-existing memory.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:07 +09:00
Nikolay Sivov
1aa53bc470
gdi32: Initialize 'param' field (Coverity).
...
For consistency with the rest of the code, initialize both
'free' and 'param' fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-22 10:46:35 +01:00
Alexandre Julliard
89f12fc101
gdi32: Periodically flush a window surface if the app is continuously painting.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-27 20:53:31 +09:00
Sebastian Lackner
a1790df348
gdi32: Add check for NULL pointer in dibdrv_wglDescribePixelFormat.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-26 23:57:49 +09:00
Nikolay Sivov
7889b17425
gdi32: Added GetFontRealizationInfo() export.
2015-09-01 19:28:16 +09:00
Michael Stefaniuc
8293cf33e0
gdi32: Remove double parentheses, not a misplaced pair (PVS-Studio).
2015-03-06 20:32:00 +09:00
Alexandre Julliard
336be2f694
gdi32: Use shorter constants for byte and word masks to avoid warnings.
2015-03-04 21:50:35 +09:00
Michael Müller
e618ab65ed
gdi32: Fix arguments for OSMesaMakeCurrent when using 16 bit formats.
2015-02-26 20:10:08 +09:00
Alexandre Julliard
55f24da978
gdi32: Check the hatch masks instead of the rop masks for the null and mask optimization case.
2014-10-27 17:35:44 +09:00