mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
c80dd54924
Right now we use one buffer for both staged changes (freshly painted changes waiting for the frame clock to send to the compositor) and committed changes (changes actively being read by the compositor process). This creates a problem in the event we need to stage updates at the same time the compositor is processing committed updates: we can't change what the compositor is actively processing. The current solution for handling this contention is to allocate a temporary buffer on the spot at the time the updates are staged, and to copy that buffer back to the shared buffer later. The problem, though, is that the copy to the shared buffer currently happens as soon as the updates are finished being staged, not when the shared buffer is done being processed by the compositor. In order to address that problem, this commit changes the code to always stage changes to a dedicated staging buffer. The staging buffer is used exclusively by the client until the client is done with it, and then once that staging buffer is committed, the client never writes to that buffer again. If the client needs to stage new updates, it allocates a brand new staging buffer, draws to it, and back fills the undrawn parts of the buffer from a copy of the contents of the committed buffer. As an optimization, the compositor has the option of releasing the committed buffer back to the client. If it does so before the client needs to stage new updates, then the client will reuse the buffer for staging future updates. This optimization prevents having to allocate a new staging buffer and the associated cost of back filling that new buffer with a readback of the committed buffer. https://bugzilla.gnome.org/show_bug.cgi?id=761312 |
||
---|---|---|
.. | ||
protocol | ||
gdkapplaunchcontext-wayland.c | ||
gdkcursor-wayland.c | ||
gdkdevice-wayland.c | ||
gdkdisplay-wayland.c | ||
gdkdisplay-wayland.h | ||
gdkdnd-wayland.c | ||
gdkeventsource.c | ||
gdkglcontext-wayland.c | ||
gdkglcontext-wayland.h | ||
gdkkeys-wayland.c | ||
gdkprivate-wayland.h | ||
gdkscreen-wayland.c | ||
gdkseat-wayland.h | ||
gdkselection-wayland.c | ||
gdkwayland.h | ||
gdkwaylanddevice.h | ||
gdkwaylanddisplay.h | ||
gdkwaylandglcontext.h | ||
gdkwaylandselection.h | ||
gdkwaylandwindow.h | ||
gdkwindow-wayland.c | ||
Makefile.am | ||
wm-button-layout-translation.c | ||
wm-button-layout-translation.h |