gdk/wayland/surface: Track and apply buffer scale

Add a new flag to track whether buffer scale is dirty or not, and centralize calling wl_surface_set_buffer_scale() in a single place: gdk_wayland_surface_sync_buffer_scale().

gdk_wayland_surface_sync_buffer_scale() is only called by gdk_wayland_surface_sync(), which itself is called by the GL, Vulkan, and Cairo contexts, right before submitting a frame. This ensure that each frame has an up-to-date buffer scale.

This mimics how opaque and input regions are tracked.

Edited by Georges Basile Stavracas Neto

Merge request reports