diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-15 08:13:57 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-03-20 10:50:25 +0100 |
commit | 65b6a62bc726b5e4f4833ed1e27733e22fabcfa8 (patch) | |
tree | ed45b0f2f9887e4a76326131e62019e717daf8d4 /nx-X11/programs/Xserver/os | |
parent | af7c3750070dfad2ebd2d615f2c3fecda7e58053 (diff) | |
download | nx-libs-65b6a62bc726b5e4f4833ed1e27733e22fabcfa8.tar.gz nx-libs-65b6a62bc726b5e4f4833ed1e27733e22fabcfa8.tar.bz2 nx-libs-65b6a62bc726b5e4f4833ed1e27733e22fabcfa8.zip |
dix: Pass ClientPtr to FlushCallback
Backported X.org commits:
commit b380f3ac51f40ffefcde7d3db5c4c149f274246d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Tue Aug 2 17:53:01 2016 +0900
dix: Pass ClientPtr to FlushCallback
This change has two effects:
1. Only calls FlushCallbacks when we're actually flushing data to a
client. The unnecessary FlushCallback calls could cause significant
performance degradation with compositing, which is significantly
reduced even without any driver changes.
2. By passing the ClientPtr to FlushCallbacks, drivers can completely
eliminate unnecessary flushing of GPU commands by keeping track of
whether we're flushing any XDamageNotify events to the client for
which the corresponding rendering commands haven't been flushed to
the GPU yet.
Reviewed-by: Adam Jackson <ajax@redha.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
commit c65f610e12f9df168d5639534ed3c2bd40afffc8
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Thu Jul 29 18:52:35 2010 -0400
Always call the flush callback chain when we flush client buffers
We were missing the callback in a couple of places. Drivers may use
the flush callback to submit batched up rendering before events (for
example, damage events) are sent out, to ensure that the rendering
has been queued when the client receives the event.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r-- | nx-X11/programs/Xserver/os/connection.c | 3 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/io.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 966fe208d..74bb13404 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -987,6 +987,9 @@ CloseDownConnection(ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; + if (FlushCallback) + CallCallbacks(&FlushCallback, client); + if (oc->output && oc->output->count) FlushClient(client, oc, (char *)NULL, 0); #ifdef XDMCP diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index 23f436b84..f4da96518 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -755,9 +755,6 @@ FlushAllOutput(void) fd_set newOutputPending; #endif - if (FlushCallback) - CallCallbacks(&FlushCallback, NULL); - if (!newoutput) return; @@ -1008,6 +1005,9 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) if (!notWritten) return 0; + if (FlushCallback) + CallCallbacks(&FlushCallback, who); + todo = notWritten; while (notWritten) { long before = written; /* amount of whole thing written */ |