gtk2/gdk/wayland
Ray Strode c80dd54924 wayland: stage uncommitted changes to dedicated buffer
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
2016-02-06 08:02:57 -05:00
..
protocol wayland: Use xdg shell protocol from wayland-protocols 2015-11-26 16:54:32 +08:00
gdkapplaunchcontext-wayland.c wayland: Formatting fixes 2015-02-28 00:02:30 -05:00
gdkcursor-wayland.c wayland: don't handle buffer release centrally 2016-02-06 08:02:57 -05:00
gdkdevice-wayland.c wayland: Set weak reference on the current grab window 2016-01-19 14:17:36 +01:00
gdkdisplay-wayland.c wayland: don't handle buffer release centrally 2016-02-06 08:02:57 -05:00
gdkdisplay-wayland.h wayland: Implement DnD actions as per wl_data_device v3 2016-01-19 14:17:36 +01:00
gdkdnd-wayland.c wayland: Protect against NULL offers on gdk_drag_status() implementation 2016-01-20 18:55:51 +01:00
gdkeventsource.c wayland: Formatting fixes 2015-02-28 00:02:30 -05:00
gdkglcontext-wayland.c wayland: Allow falling back to compatibility EGL contexts 2015-10-07 16:21:57 +01:00
gdkglcontext-wayland.h gl: Drop profile for gdk_window_create_gl_context() 2015-02-12 12:34:28 +00:00
gdkkeys-wayland.c wayland: Translate virtual modifiers too 2015-11-14 23:26:11 -05:00
gdkprivate-wayland.h wayland: always return FALSE from begin_paint 2016-02-06 08:02:57 -05:00
gdkscreen-wayland.c wayland: recursively search for the settings schema. 2015-12-14 08:20:04 -05:00
gdkseat-wayland.h wayland: Add GdkSeat implementation 2015-12-15 00:40:21 +01:00
gdkselection-wayland.c wayland: Implement DnD actions as per wl_data_device v3 2016-01-19 14:17:36 +01:00
gdkwayland.h wayland: Formatting fixes 2015-02-28 00:02:30 -05:00
gdkwaylanddevice.h wayland: Add GdkSeat implementation 2015-12-15 00:40:21 +01:00
gdkwaylanddisplay.h wayland: fix rename of wl_shell to xdg_shell 2014-01-20 14:37:33 -05:00
gdkwaylandglcontext.h GL: Follow naming conventions 2014-10-21 23:48:12 -04:00
gdkwaylandselection.h Drop gdk_wayland_drag_context_get_dnd_window 2015-12-02 00:47:53 -05:00
gdkwaylandwindow.h wayland: Replace wl_shell_surface with xdg_shell 2013-11-18 13:44:20 -05:00
gdkwindow-wayland.c wayland: stage uncommitted changes to dedicated buffer 2016-02-06 08:02:57 -05:00
Makefile.am wayland: Add GdkSeat implementation 2015-12-15 00:40:21 +01:00
wm-button-layout-translation.c wayland: Set gtk-decoration-layout 2014-06-06 15:32:59 +02:00
wm-button-layout-translation.h wayland: Set gtk-decoration-layout 2014-06-06 15:32:59 +02:00