Commit Graph

165 Commits

Author SHA1 Message Date
Jacek Caban 148a2b60a5 gdi32: Move layout to DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:04 +02:00
Jacek Caban b0240461f1 gdi32: Rename gdi_private.h to ntgdi_private.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00
Jacek Caban 06afb958d4 gdi32: Store ntgdi object types in handle table.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:12:52 +02:00
Jacek Caban 0a42d6a915 gdi32: Use ntgdi names for region functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:58:02 +02:00
Jacek Caban 8df14dac7a gdi32: Use ntgdi names for region constructors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:57:58 +02:00
Jacek Caban 3dcb5db47f gdi32: Reimplement GetObjectA on top of GetObjectW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:08 +02:00
Jacek Caban dc73184c29 gdi32: Directly use ntgdi interface to select objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban 341be5f3f2 gdi32: Reimplement SelectObject on top of ntgdi interface.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban 30550d2e6d gdi32: Introduce NtGdiSelectBitmap.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Jacek Caban a96fcf21b0 gdi32: Introduce gdi_obj_header and use it to store gdi_obj_funcs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Haoyang Chen abd0cddc5f gdi32: Avoid exceeding the actual bitmap height.
The bottom-up case is handled earlier on.  For the top-down
case, 'lines' is left untouched.

Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 13:58:33 +01:00
Alexandre Julliard aa90a5969f gdi32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:44:16 +01:00
Alexandre Julliard 4a902de213 gdi32: Make GDI driver functions cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-06 21:47:58 +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
Alex Henrie 478a3d64ef gdi32: Add DECLSPEC_HOTPATCH to GetDIBits.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-06 19:44:27 +02: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 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
Huw Davies fe26147c17 gdi32: Reset the image size when cropping the source bitmap.
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 2eeed2df51 gdi32: Initialize biSizeImage in the DDB's bitmapinfo.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Huw Davies 8c2374ab08 gdi32: Update biSizeImage when uncompressing the RLE bitmap.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Huw Davies 9d0338bc4f gdi32: Don't copy biSizeImage in copy_color_info().
It meant there was a hack which incorrectly changed the corresponding value in src_info.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Daniel Lehman 5244bd0748 gdi32: Initialize rgbReserved to zero in SetDIBColorTable.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:36:39 +01:00
Henri Verbeet d837b71557 gdi32: Add support for D3DDDIFMT_A4R4G4B4 and D3DDDIFMT_X4R4G4B4 to D3DKMTCreateDCFromMemory().
These are needed by wined3d to support DCs on WINED3DFMT_B4G4R4A4_UNORM and
WINED3DFMT_B4G4R4X4_UNORM textures, as required by the Microsoft Motocross
Madness demo. Note that these formats are not available on versions of Windows
newer than Vista, and as far as I'm aware the application doesn't work on
those versions. I don't expect exposing more formats to be an issue in
practice, but these could be hidden behind a version check if needed.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-17 07:41:47 -06:00
Huw Davies 199ca9258a gdi32: Access several more properties directly from the DC.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +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 f4bc213ce5 gdi32: Use an internal version of LPtoDP that takes a DC * where possible.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-18 19:38:14 +09:00
Jacek Caban 585f6074b0 gdi32: Make CreateDIBSection hotpatchable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:18:27 +09:00
Huw Davies f5bffe0ef7 gdi32: Use the get_mono_dc_colors() helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +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
Alexandre Julliard eddc4609ec gdi32: Fix StretchDIBits color mapping for monochrome bitmaps without a color table.
This is the equivalent of df924f6a8c for
the StretchDIBits case.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-04 21:56:20 +09:00
Michael Müller cde2fbb08e gdi32: Make BitBlt and StretchDIBits hotpatchable.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-05 22:27:13 +09:00
Gerald Pfeifer ff05f2dec6 gdi32: Remove unused constant bit_fields_565. 2014-08-11 23:55:19 +02:00
Michael Stefaniuc 7589bbeee4 gdi32: Avoid using CONST. 2013-09-23 11:53:59 +02:00
Alexandre Julliard 69abf20fcd gdi32: Add a check for overflow in DIB dimensions. 2013-09-11 18:33:06 +02:00
Andrew Talbot f98f70fb41 gdi32: Avoid signed-unsigned integer comparisons. 2013-01-21 12:51:15 +01:00
Alexandre Julliard df357093cc gdi32: Get rid of the GDIOBJHDR type. 2012-10-17 13:48:45 +02:00
Alexandre Julliard b95dd7e831 gdi32: Store the object selection count directly in the GDI handle table. 2012-10-17 13:17:56 +02:00
Alexandre Julliard 6e325afaa7 gdi32: Handle a missing source alpha directly in the blend_rect primitive instead of modifying the source data. 2012-10-10 20:34:08 +02:00
Alexandre Julliard e95cff0332 gdi32: Always update the DC before looking for the physdev pointer. 2012-09-20 21:07:04 +02:00
Michael Stefaniuc 4d3a7aa268 gdi32: Avoid TRUE:FALSE conditional expressions. 2012-08-13 17:29:23 +02:00
Alexandre Julliard 1c2f9255f4 gdi32: Fix StretchDIBits return value when destination is clipped. 2012-06-22 14:39:28 +02:00
Alexandre Julliard 1416d0e6f1 gdi32: Remove the bitmap parameter from the Get/PutImage entry points. 2012-05-29 21:05:52 +02:00
Alexandre Julliard 7c4c233d12 gdi32: Add a helper function that implements PutImage on a bitmap. 2012-05-29 18:20:12 +02:00
Alexandre Julliard cf85fb14ab gdi32: Add a helper function that implements GetImage on a bitmap. 2012-05-29 18:20:11 +02:00
Alexandre Julliard 592bfd52c9 gdi32: Always use the DIB engine for DDB rendering. 2012-05-29 18:20:10 +02:00
Alexandre Julliard e94d3b4e08 gdi32: Add a priority mechanism for pushing drivers on the stack in a defined order. 2012-05-08 12:16:50 +02:00
Alexandre Julliard 41e5bc06d8 gdi32: Add support for clipping source coordinates to the DC device rectangle. 2012-04-30 22:47:35 +02:00
Alexandre Julliard 71ea68b657 gdi32: Use the bitmap part of the DIBSECTION structure for the DDB object information. 2012-01-10 16:13:29 +01:00
Alexandre Julliard e896af4065 gdi32: Always store a DIBSECTION structure in the bitmap object. 2012-01-10 16:13:29 +01:00
Alexandre Julliard 8a9be0a30b gdi32: Get rid of the get_bitmap_funcs function.
DIBs no longer use the display driver functions.
2012-01-10 16:13:28 +01:00