Skip to content

Fix HiDPI swap regions on Wayland

Jonas Ådahl requested to merge jadahl/gtk:wip/wayland-hidpi-swap-region into master

eglSwapBuffersWithDamage() wants buffer coordinates, and I assume so is the case for Vulkan too; and as far as I can see, the draw contexts operate in surface coordinates. Thus we need to translate to buffer coordinates before passing the damage regions over OpenGL/Vulkan.

This was not a problem until we started asking for a relatively new wl_compositor where the damage_buffer request as added. Prior to that, EGL/Vulkan didn't use damage regions at all, as it didn't have the ability to damage the correct region without knowing the buffer scale.

Merge request reports