I'm not completely sure about the mechanism, but I think it's simple enough to consider having that upstream now. This shows at least how we can leverage win32u surface changes to decide to switch surfaces on/off-screen and fallback to manual blitting.
Having the surfaces on-screen makes sure they are presented as efficiently as possible, having them off-screen we use GDI blit to indirectly call XCopyArea and this will be suboptimal, probably with visible tearing, but hopefully not too common.
--
v4: win32u: Use GDI blit to implement partial or other process presentation.
winex11: Return an offscreen HDC from vulkan_surface_detach.
win32u: Pass a HDC parameter to vulkan_surface_detach.
winex11: Create a window surface even when there is client window.
winex11: Also attach child client windows to their toplevel window.
win32u: Make sure vulkan windows have a pixel format selected.
win32u: Detach vulkan surfaces that aren't fully visible.
win32u: Detach offscreen, child or vulkan surfaces for another process.
win32u: Move vulkan surfaces to their new parent when reparenting.
win32u: Introduce a new vulkan offscreen surfaces list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5573
This introduces a new alternative FFmpeg-based implementation for the
MF byte stream handlers, while keeping the current GStreamer-based as
default.
The new implementation can be enabled by setting the DWORD value:
DisableGstByteStreamHandler = 1
in the HKCU\Software\Wine\MediaFoundation registry key.
--
v4: mfsrcsnk: Stub byte stream handlers if demuxing is supported.
winedmo: Export a new winedmo_demuxer_check function.
winedmo: Link and initialize FFmpeg on load.
winedmo: Load a unixlib on process attach.
winedmo: Introduce a new internal DLL.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6442
This introduces a new alternative FFmpeg-based implementation for the
MF byte stream handlers, while keeping the current GStreamer-based as
default.
The new implementation can be enabled by setting the DWORD value:
DisableGstByteStreamHandler = 1
in the HKCU\Software\Wine\MediaFoundation registry key.
--
v3: mfsrcsnk: Stub byte stream handlers if demuxing is supported.
winedmo: Export a new winedmo_demuxer_check function.
winedmo: Link and initialize FFmpeg on load.
winedmo: Load a unixlib on process attach.
winedmo: Introduce a new internal DLL.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6442
This does the same as https://gitlab.winehq.org/wine/wine/-/merge_requests/6398 but for Vulkan. It also implements vulkan child window rendering pretty much for free and supersedes https://gitlab.winehq.org/wine/wine/-/merge_requests/5573.
It is not completely optimal and there as missed opportunities to keep child windows on screen when no DPI scaling and no cropping is needed, but it would require to be smarter and have knowledge about the window clipping region, which will probably better be done in win32u. This is exactly the same for OpenGL, and it will probably be solved together.
--
v3: winex11: Implement vulkan DPI scaling and child window rendering.
winex11: Move offscreen client window helpers to init.c.
winex11: Only update the client window position in sync_client_position.
winex11: Update the GL client window size when it is presented.
winex11: Update the vulkan surface size when it is presented.
winex11: Use a dedicated structure for vulkan surface private data.
win32u: Pass vulkan driver private data to vulkan_surface_presented.
winevulkan: Use client rect in window DPI instead of monitor DPI.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6467
File emfdc.c, function get_bitmap_info:
Memory leaks in get_bitmap_info via return before calling DeleteDC and DeleteObject.
--
v8: gdi32: Actually return the device context and bitmap from get_bitmap_info().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6453
This does the same as https://gitlab.winehq.org/wine/wine/-/merge_requests/6398 but for Vulkan. It also implements vulkan child window rendering pretty much for free and supersedes https://gitlab.winehq.org/wine/wine/-/merge_requests/5573.
It is not completely optimal and there as missed opportunities to keep child windows on screen when no DPI scaling and no cropping is needed, but it would require to be smarter and have knowledge about the window clipping region, which will probably better be done in win32u. This is exactly the same for OpenGL, and it will probably be solved together.
--
v2: winex11: Implement vulkan DPI scaling and child window rendering.
winex11: Only update the client window position in sync_client_position.
winex11: Update the GL client window size when it is presented.
winex11: Update the vulkan surface size when it is presented.
winex11: Use a dedicated structure for vulkan surface private data.
win32u: Pass vulkan driver private data to vulkan_surface_presented.
winevulkan: Use client rect in window DPI instead of monitor DPI.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6467