From 0c930b9ca31a868679372528954ef5b8e6b83b33 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 5 Apr 2023 23:21:43 +0200 Subject: Wayland: limit copied pixels when window update is a region --- documentation/src/wayland.dox | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'documentation/src') diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox index 4c9fbfd94..c621b8160 100644 --- a/documentation/src/wayland.dox +++ b/documentation/src/wayland.dox @@ -345,9 +345,10 @@ graphics data to the display. That is done by calling function \c Fl_Wayland_Graphics_Driver::buffer_commit() which copies the byte array of the Cairo surface to the Wayland buffer's starting memory address, and calls functions \c wl_surface_attach() and \c wl_surface_commit(). Before calling Fl_Window::flush(), -FLTK has computed a damaged region. \c Fl_Wayland_Window_Driver::flush() also calls function -\c wl_surface_damage_buffer() with that information to inform the compositor of what parts -of the surface need its attention. +FLTK has computed a damaged region. If that region is not null, +\c Fl_Wayland_Graphics_Driver::buffer_commit() copies only the damaged part of the Cairo +surface to the Wayland buffer and calls function \c wl_surface_damage_buffer() for these +parts to inform the compositor of what parts of the surface need its attention. An important detail here is that FLTK uses Wayland's synchronization mechanism to make sure the surface's \c wl_buffer is not changed until the surface is fully -- cgit v1.2.3