Rebase against b87f35898d22b90e36970e0b1fce1172ba64eb15.

This commit is contained in:
Elizabeth Figura 2024-06-28 16:33:01 -05:00
parent 9a246d19b3
commit 9ba0efb9da
4 changed files with 16 additions and 69 deletions

View File

@ -1,4 +1,4 @@
From 2b442e1f3c5c13871b30fd8d2269c957c013142f Mon Sep 17 00:00:00 2001
From c29dcf91511dfd49d9fb42c457728e1d72258973 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 17 May 2017 23:55:55 +0800
Subject: [PATCH] server: Add support for a layered window region. (v3)
@ -10,7 +10,7 @@ Subject: [PATCH] server: Add support for a layered window region. (v3)
3 files changed, 84 insertions(+)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 94aa06773a7..feb1a0a46c2 100644
index c28a4d2d9a3..b971d313de3 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -48,6 +48,7 @@
@ -21,7 +21,7 @@ index 94aa06773a7..feb1a0a46c2 100644
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(bitblt);
@@ -1627,6 +1628,48 @@ static inline void add_row( HRGN rgn, RGNDATA *data, int x, int y, int len )
@@ -1620,6 +1621,48 @@ static inline void add_row( HRGN rgn, RGNDATA *data, int x, int y, int len )
}
#endif
@ -70,15 +70,15 @@ index 94aa06773a7..feb1a0a46c2 100644
/***********************************************************************
* update_surface_region
*/
@@ -1645,6 +1688,7 @@ static void update_surface_region( struct x11drv_window_surface *surface )
if (!surface->is_argb && surface->color_key == CLR_INVALID)
@@ -1638,6 +1681,7 @@ static void update_surface_region( struct x11drv_window_surface *surface, const
if (!alpha_mask && color_key == CLR_INVALID)
{
XShapeCombineMask( gdi_display, surface->window, ShapeBounding, 0, 0, None, ShapeSet );
+ set_layer_region( surface, NULL );
return;
}
@@ -1755,6 +1799,7 @@ static void update_surface_region( struct x11drv_window_surface *surface )
@@ -1748,6 +1792,7 @@ static void update_surface_region( struct x11drv_window_surface *surface, const
free( data );
}
@ -87,10 +87,10 @@ index 94aa06773a7..feb1a0a46c2 100644
#endif
}
diff --git a/server/protocol.def b/server/protocol.def
index 5d60e7fcda3..bf3f8295c64 100644
index 33fd7a96e03..7665e364172 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2625,6 +2625,13 @@ enum coords_relative
@@ -2665,6 +2665,13 @@ enum coords_relative
@END
@ -105,7 +105,7 @@ index 5d60e7fcda3..bf3f8295c64 100644
@REQ(get_update_region)
user_handle_t window; /* handle to the window */
diff --git a/server/window.c b/server/window.c
index 242e93f303a..970cbab7b8a 100644
index 4ebfec3da12..4d2e55ca027 100644
--- a/server/window.c
+++ b/server/window.c
@@ -71,6 +71,7 @@ struct window
@ -116,7 +116,7 @@ index 242e93f303a..970cbab7b8a 100644
struct region *update_region; /* update region (relative to window rect) */
unsigned int style; /* window style */
unsigned int ex_style; /* window extended style */
@@ -564,6 +565,7 @@ static struct window *create_window( struct window *parent, struct window *owner
@@ -567,6 +568,7 @@ static struct window *create_window( struct window *parent, struct window *owner
win->atom = atom;
win->last_active = win->handle;
win->win_region = NULL;
@ -124,7 +124,7 @@ index 242e93f303a..970cbab7b8a 100644
win->update_region = NULL;
win->style = 0;
win->ex_style = 0;
@@ -822,6 +824,9 @@ static int is_point_in_window( struct window *win, int *x, int *y, unsigned int
@@ -824,6 +826,9 @@ static int is_point_in_window( struct window *win, int *x, int *y, unsigned int
if (win->win_region &&
!point_in_region( win->win_region, *x - win->window_rect.left, *y - win->window_rect.top ))
return 0; /* not in window region */
@ -134,7 +134,7 @@ index 242e93f303a..970cbab7b8a 100644
return 1;
}
@@ -1979,6 +1984,14 @@ static void set_window_region( struct window *win, struct region *region, int re
@@ -1981,6 +1986,14 @@ static void set_window_region( struct window *win, struct region *region, int re
}
@ -149,7 +149,7 @@ index 242e93f303a..970cbab7b8a 100644
/* destroy a window */
void free_window_handle( struct window *win )
{
@@ -2042,6 +2055,7 @@ void free_window_handle( struct window *win )
@@ -2044,6 +2057,7 @@ void free_window_handle( struct window *win )
detach_window_thread( win );
if (win->parent) set_parent_window( win, NULL );
@ -157,7 +157,7 @@ index 242e93f303a..970cbab7b8a 100644
free_user_handle( win->handle );
win->handle = 0;
release_object( win );
@@ -2699,6 +2713,24 @@ DECL_HANDLER(set_window_region)
@@ -2693,6 +2707,24 @@ DECL_HANDLER(set_window_region)
}
@ -183,5 +183,5 @@ index 242e93f303a..970cbab7b8a 100644
DECL_HANDLER(get_update_region)
{
--
2.43.0
2.45.2

View File

@ -1,52 +0,0 @@
From 8fc8b557147de0cffc56501a6ec7ca02b5aa2af0 Mon Sep 17 00:00:00 2001
From: Stanislav Zhukov <koncord@tes3mp.com>
Date: Wed, 11 Jul 2018 09:33:19 +1000
Subject: [PATCH] wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to
WINED3DFMT_L8_UNORM conversion.
Signed-off-by: Stanislav Zhukov <koncord@tes3mp.com>
---
dlls/wined3d/surface.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2f74ad6..ba0b647 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -801,6 +801,25 @@ static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst,
}
}
+static void convert_x8r8g8b8_l8(const BYTE *src, BYTE *dst,
+ unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
+{
+ unsigned int x, y;
+
+ TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out);
+
+ for (y = 0; y < h; ++y)
+ {
+ const DWORD *src_line = (const DWORD *)(src + y * pitch_in);
+ BYTE *dst_line = (BYTE *)(dst + y * pitch_out);
+
+ for (x = 0; x < w; ++x)
+ {
+ dst_line[x] = src_line[x] & 0x000000ff;
+ }
+ }
+}
+
struct d3dfmt_converter_desc
{
enum wined3d_format_id from, to;
@@ -815,6 +834,7 @@ static const struct d3dfmt_converter_desc converters[] =
{WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_B8G8R8A8_UNORM, convert_a8r8g8b8_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5},
+ {WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_L8_UNORM, convert_x8r8g8b8_l8},
};
static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_format_id from,
--
2.7.4

View File

@ -1 +0,0 @@
Fixes: [44888] Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion

View File

@ -1 +1 @@
07544942e2c9c2f35263adb5104998f18967dc6c
b87f35898d22b90e36970e0b1fce1172ba64eb15