forked from AuroraMiddleware/gtk
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 |
||
---|---|---|
.. | ||
broadway | ||
deprecated | ||
mir | ||
quartz | ||
wayland | ||
win32 | ||
x11 | ||
COPYING | ||
fallback-c89.c | ||
gdk-autocleanup.h | ||
gdk-private.c | ||
gdk-private.h | ||
gdk.c | ||
gdk.h | ||
gdkapplaunchcontext.c | ||
gdkapplaunchcontext.h | ||
gdkapplaunchcontextprivate.h | ||
gdkcairo.c | ||
gdkcairo.h | ||
gdkconfig.h.win32 | ||
gdkconfig.h.win32_broadway | ||
gdkcursor.c | ||
gdkcursor.h | ||
gdkcursorprivate.h | ||
gdkdeprecated.c | ||
gdkdevice.c | ||
gdkdevice.h | ||
gdkdevicemanager.c | ||
gdkdevicemanager.h | ||
gdkdevicemanagerprivate.h | ||
gdkdeviceprivate.h | ||
gdkdisplay.c | ||
gdkdisplay.h | ||
gdkdisplaymanager.c | ||
gdkdisplaymanager.h | ||
gdkdisplaymanagerprivate.h | ||
gdkdisplayprivate.h | ||
gdkdnd.c | ||
gdkdnd.h | ||
gdkdndprivate.h | ||
gdkenumtypes.c.template | ||
gdkenumtypes.h.template | ||
gdkevents.c | ||
gdkevents.h | ||
gdkframeclock.c | ||
gdkframeclock.h | ||
gdkframeclockidle.c | ||
gdkframeclockidle.h | ||
gdkframeclockprivate.h | ||
gdkframetimings.c | ||
gdkframetimings.h | ||
gdkgl.c | ||
gdkglcontext.c | ||
gdkglcontext.h | ||
gdkglcontextprivate.h | ||
gdkglobals.c | ||
gdkinternals.h | ||
gdkintl.h | ||
gdkkeynames.c | ||
gdkkeys.c | ||
gdkkeys.h | ||
gdkkeysprivate.h | ||
gdkkeysyms-compat.h | ||
gdkkeysyms-update.pl | ||
gdkkeysyms.h | ||
gdkkeyuni.c | ||
gdkmain.h | ||
gdkmarshalers.list | ||
gdkoffscreenwindow.c | ||
gdkpango.c | ||
gdkpango.h | ||
gdkpixbuf-drawable.c | ||
gdkpixbuf.h | ||
gdkprivate.h | ||
gdkproperty.c | ||
gdkproperty.h | ||
gdkrectangle.c | ||
gdkrectangle.h | ||
gdkrgba.c | ||
gdkrgba.h | ||
gdkscreen.c | ||
gdkscreen.h | ||
gdkscreenprivate.h | ||
gdkseat.c | ||
gdkseat.h | ||
gdkseatdefault.c | ||
gdkseatdefaultprivate.h | ||
gdkseatprivate.h | ||
gdkselection.c | ||
gdkselection.h | ||
gdktestutils.h | ||
gdkthreads.h | ||
gdktypes.h | ||
gdkversionmacros.h.in | ||
gdkvisual.c | ||
gdkvisual.h | ||
gdkvisualprivate.h | ||
gdkwindow.c | ||
gdkwindow.h | ||
gdkwindowimpl.c | ||
gdkwindowimpl.h | ||
gdkx.h | ||
gen-keyname-table.pl | ||
keyname-table.h | ||
keynames-translate.txt | ||
keynames.txt | ||
Makefile.am | ||
makefile.msc |