Note that this creates two global DISPLAY DCs, where the drawables are selected, to avoid frequent DC recreations which is costly. The draw calls are serialized between threads with the global context mutex.
As far as I can tell it performs similarly to the current XCopyArea implementation that is used for child window rendering, but has the advantage of being able to use XRender for scaling when we need to rescale the GL client area.
This also avoids all the issues that come with Proton fshack (with hooking the GL context to scale the framebuffer through GL calls), and hopefully achieving more or less the same thing, at the probable cost of additional copies.
-- v2: winex11: Use offscreen rendering to scale DPI-unaware GL windows. winex11: Drop now unnecessary X11DRV_FLUSH_GL_DRAWABLE ExtEscape. winex11: Implement offscreen window presents with NtGdiStretchBlt. winex11: Introduce a new present_gl_drawable helper. winex11: Detach offscreen OpenGL windows after creation. winex11: Create OpenGL client windows in window DPI units. winex11: Resize offscreen client surfaces after they are presented.