xserver-multidpi/miext
Alex Goins 7f962c70b6 xsync: Add resource inside of SyncCreate, export SyncCreate
As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
want to create a fence, then initialize it in their own way. This currently
can't be done without adding a function directly to Xext/sync.c due to the fact
that the RTFence resource type is private and there is no external interface to
add to it.

To facilitate other X extensions creating fences and initializing them, this
change exports SyncCreate() and adds the resource directly within it. Callers no
longer need to call AddResource() after SyncCreate(), they only need to
initialize the SyncObject.

To prevent FreeFence() and FreeCounter() from segfaulting if the call to
AddResource() fails before the sync object is initialized, this adds a new
'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
FreeCounter() to skip de-initialization and simply free the object.
Initialization after adding the resource shouldn't otherwise be a problem due to
the single-threaded nature of X.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2019-04-17 14:01:17 -07:00
..
damage miext/damage: take care of the coordinate mode in damagePolyPoint 2018-09-25 21:27:08 -07:00
rootless Remove fd_set from Block/Wakeup handler API 2016-07-18 15:27:51 -04:00
shadow meson: Distribute more SDK headers 2018-04-02 13:42:08 -04:00
sync xsync: Add resource inside of SyncCreate, export SyncCreate 2019-04-17 14:01:17 -07:00
Makefile.am rootless: Build unconditionally 2015-07-08 16:41:28 -04:00