os: always check if client is local when connection is accepted

LocalClient is used for all DRI2 requests that makes it frequently
called function. Querying if connection is local or not takes 10-15us
(on ARM) depending on malloc speed.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Pauli Nieminen 2010-12-30 19:19:43 +02:00 • committed by Daniel Stone
commit 2d67ada3c4
3 changed files with 17 additions and 6 deletions

View file

@ -746,6 +746,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
free(oc);
return NullClient;
}
oc->local_client = ComputeLocalClient(client);
#if !defined(WIN32)
ConnectionTranslation[fd] = client->index;
#else