diff options
author | Adam Jackson <ajax@redhat.com> | 2016-04-01 22:44:26 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-05-04 10:58:01 -0400 |
commit | 137ac094e7ab8c871f3b36e40ad826ac797f0e26 (patch) | |
tree | 176d84564ba28a563152634d5726ada7ce613969 /xfixes | |
parent | ac164e58870d70640381e68b776eb95578c7fbd3 (diff) |
dix: Push UpdateCurrentTimeIf down out of the main loop
This was added in:
commit 312910b4e34215aaa50fc0c6092684d5878dc32f
Author: Chase Douglas <chase.douglas@canonical.com>
Date: Wed Apr 18 11:15:40 2012 -0700
Update currentTime in dispatch loop
Unfortunately this is equivalent to calling GetTimeInMillis() once per
request. In the absolute best case (as on Linux) you're only hitting the
vDSO; on other platforms that's a syscall. Either way it puts a pretty
hard ceiling on request throughput.
Instead, push the call down to the requests that need it; basically,
grab processing and event generation.
Cc: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'xfixes')
-rw-r--r-- | xfixes/cursor.c | 1 | ||||
-rw-r--r-- | xfixes/select.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 10f9b2346..f009a78b9 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -153,6 +153,7 @@ CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) if (pCursor != CursorCurrent[pDev->id]) { CursorEventPtr e; + UpdateCurrentTimeIf(); CursorCurrent[pDev->id] = pCursor; for (e = cursorEvents; e; e = e->next) { if ((e->eventMask & XFixesDisplayCursorNotifyMask)) { diff --git a/xfixes/select.c b/xfixes/select.c index e964d588c..87a3ad777 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -75,6 +75,7 @@ XFixesSelectionCallback(CallbackListPtr *callbacks, void *data, void *args) default: return; } + UpdateCurrentTimeIf(); for (e = selectionEvents; e; e = e->next) { if (e->selection == selection->selection && (e->eventMask & eventMask)) { xXFixesSelectionNotifyEvent ev = { |