gtk2/gdk
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
..
broadway broadway: Define variables where they are used 2016-02-03 23:07:05 +01:00
deprecated gdkcolor.h: Use GDK_DEPRECATED_IN_3_14_FOR() throughout 2015-04-17 11:16:30 -05:00
mir mir: add default GdkSeat for the default GdkDisplay 2016-01-15 14:10:53 -05:00
quartz quartz: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:21 +01:00
wayland wayland: stage uncommitted changes to dedicated buffer 2016-02-06 08:02:57 -05:00
win32 win32 geometry: reorganize code to avoid prototypes 2016-01-23 14:43:57 +01:00
x11 x11: don't apply scaling factor twice 2016-02-04 11:02:09 -05:00
COPYING
fallback-c89.c
gdk-autocleanup.h gdk: Add support for g_autoptr() 2015-02-02 09:28:22 +01:00
gdk-private.c gdk: Make debug-updates a per-display setting 2014-11-10 15:23:14 -05:00
gdk-private.h gdk: Make debug-updates a per-display setting 2014-11-10 15:23:14 -05:00
gdk.c Control legacy GL context via environment variable 2015-10-07 16:21:57 +01:00
gdk.h gdk: Add GdkSeat 2015-12-15 00:16:15 +01:00
gdkapplaunchcontext.c
gdkapplaunchcontext.h
gdkapplaunchcontextprivate.h
gdkcairo.c gdkcairo: Bail if surface is in error 2015-02-25 01:55:28 +01:00
gdkcairo.h gdk: Add support for OpenGL 2014-10-13 10:43:31 -04:00
gdkconfig.h.win32
gdkconfig.h.win32_broadway
gdkcursor.c Add context-menu to the list of standard cursor names 2016-01-06 14:57:42 -05:00
gdkcursor.h Update docs 2015-05-08 13:34:25 -04:00
gdkcursorprivate.h
gdkdeprecated.c
gdkdevice.c gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdevice.h gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdevicemanager.c Improve deprecation note for gdk_device_manager_get_client_pointer 2016-01-11 15:09:47 -05:00
gdkdevicemanager.h gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdevicemanagerprivate.h
gdkdeviceprivate.h GdkDevice: Add GdkSeat property and getter 2015-12-15 00:16:15 +01:00
gdkdisplay.c GdkDisplay: Add a few ignore deprecations statements around GdkDeviceManager 2015-12-16 19:47:06 +01:00
gdkdisplay.h gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdisplaymanager.c Avoid an extra type check in gdk_screen_get_default 2015-09-07 03:18:04 -04:00
gdkdisplaymanager.h
gdkdisplaymanagerprivate.h
gdkdisplayprivate.h GdkDisplay: Add GdkSeat getters 2015-12-15 00:16:15 +01:00
gdkdnd.c gdk: Don't translate signal names 2016-01-26 12:42:04 -05:00
gdkdnd.h gdk: Allow internal management of source-side DnD 2016-01-19 14:17:35 +01:00
gdkdndprivate.h gdk: Add gdk_drag_get_cursor() 2016-01-19 14:17:35 +01:00
gdkenumtypes.c.template
gdkenumtypes.h.template Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkevents.c gdk: Run DnD internal handlers before the main event handler 2016-01-19 14:17:35 +01:00
gdkevents.h wayland: add gdk_event_is_scroll_stop_event() 2016-01-18 21:36:23 +01:00
gdkframeclock.c gdk: add many missing (nullable) return value annotations 2014-05-11 11:48:32 -04:00
gdkframeclock.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkframeclockidle.c
gdkframeclockidle.h GdkFrameClockIdle: Add a missing declaration 2014-09-05 20:44:22 -04:00
gdkframeclockprivate.h
gdkframetimings.c
gdkframetimings.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkgl.c gl: Use older GLSL shaders with legacy contexts 2015-10-07 16:21:57 +01:00
gdkglcontext.c docs: Improve description of gdk_gl_context_is_legacy() 2015-10-07 16:21:57 +01:00
gdkglcontext.h gdk: Allow querying if a GL context is in legacy mode 2015-10-07 16:21:57 +01:00
gdkglcontextprivate.h gl: Store the legacy bit in the GL program data 2015-10-07 16:21:57 +01:00
gdkglobals.c Add GDK_GL env var and GdkGLFlags 2014-11-06 12:24:43 +01:00
gdkinternals.h GdkEvent: Add GdkSeat getter and internal setter 2015-12-15 00:16:15 +01:00
gdkintl.h
gdkkeynames.c
gdkkeys.c Intern all signal names beforehand 2015-09-12 12:50:39 -04:00
gdkkeys.h gdkkeys: Add support to _get_scroll_lock_state() 2015-04-27 20:07:52 -03:00
gdkkeysprivate.h gdkkeys: Add support to _get_scroll_lock_state() 2015-04-27 20:07:52 -03:00
gdkkeysyms-compat.h
gdkkeysyms-update.pl
gdkkeysyms.h
gdkkeyuni.c Revert "Translate GDK_KEY_KP_Decimal according to locale" 2016-01-08 08:59:02 -05:00
gdkmain.h Make global GDK libgtk_only functions more private 2014-11-08 00:20:15 -05:00
gdkmarshalers.list
gdkoffscreenwindow.c gdkoffscreenwindow: use embedder to derive surfaces & scale factor 2015-12-03 21:47:29 +00:00
gdkpango.c docs: Another round of markup removal 2014-03-29 00:24:15 -04:00
gdkpango.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdkpixbuf-drawable.c Fix the fix to the last commit 2015-12-16 12:42:27 +00:00
gdkpixbuf.h
gdkprivate.h
gdkproperty.c Trivial formatting fix 2014-08-30 00:53:21 -04:00
gdkproperty.h
gdkrectangle.c Clarify docs for gdk_rectangle_union 2016-01-20 13:44:34 -05:00
gdkrectangle.h gdk: Add gdk_rectangle_equal() 2015-10-03 22:26:27 -04:00
gdkrgba.c Revert "Add missing (out) annotation to gdk_rgba_parse" 2016-02-02 15:08:10 +00:00
gdkrgba.h
gdkscreen.c gdk: Clarify docs about scale 2016-01-18 08:54:35 -05:00
gdkscreen.h
gdkscreenprivate.h Handle resolution changes in the GDK backend code 2014-07-13 15:35:23 -04:00
gdkseat.c gdkseat: remove return from gdk_seat_ungrab 2016-01-12 18:49:40 +02:00
gdkseat.h GdkSeat: Add G_BEGIN_DECLS and G_END_DECLS 2015-12-22 10:33:41 +01:00
gdkseatdefault.c gdk: Add GdkSeatDefault 2015-12-15 00:16:15 +01:00
gdkseatdefaultprivate.h gdk: Add GdkSeatDefault 2015-12-15 00:16:15 +01:00
gdkseatprivate.h gdk: Add GdkSeat 2015-12-15 00:16:15 +01:00
gdkselection.c gdk: assorted introspection and documentation fixes 2014-05-19 11:47:59 -07:00
gdkselection.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdktestutils.h
gdkthreads.h
gdktypes.h gdkborder: remove unneeded definition 2016-02-03 11:20:52 -05:00
gdkversionmacros.h.in gdk: Add version macros for 3.20 2015-10-03 22:24:17 -04:00
gdkvisual.c Small doc improvement 2014-09-07 17:14:37 -04:00
gdkvisual.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdkvisualprivate.h
gdkwindow.c wayland: add gdk_event_is_scroll_stop_event() 2016-01-18 21:36:23 +01:00
gdkwindow.h gdkwindow: move GdkWindowTypeHint to gdktypes.h 2015-12-15 10:13:03 -05:00
gdkwindowimpl.c gdkwindow: Provide a default implementation of process_updates_recurse 2014-06-22 10:20:50 -04:00
gdkwindowimpl.h gdk: Allow passing the start coordinates in drag_begin 2015-12-13 10:39:43 -05:00
gdkx.h
gen-keyname-table.pl
keyname-table.h
keynames-translate.txt
keynames.txt
Makefile.am Windows library manager fix 2016-01-15 11:16:32 +01:00
makefile.msc