diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-20 11:16:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-20 11:29:20 +0100 |
commit | 24ab9145c7748cb344b69d70b4f8eccb0c90db76 (patch) | |
tree | 375e6ad49e81c2727e45eae13b9590ad93c4ede3 /src/sna/sna_accel.c | |
parent | df0b2ce823e8bc9e994875ce349cf1da4cf8e402 (diff) |
Update to ABI 22 and NotifyFd
ABI 22 brings in a new BlockHandler/WakeupHandler interface
(SetNotifyFd) and throws out the current interface (albeit without
delivering any improvements).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 48dcb585..e06cd245 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -18024,6 +18024,13 @@ static bool sna_option_accel_blt(struct sna *sna) return strcasecmp(s, "blt") == 0; } +#if HAVE_NOTIFY_FD +static void sna_accel_notify(int fd, int ready, void *data) +{ + sna_mode_wakeup(data); +} +#endif + bool sna_accel_init(ScreenPtr screen, struct sna *sna) { const char *backend; @@ -18035,7 +18042,7 @@ bool sna_accel_init(ScreenPtr screen, struct sna *sna) list_init(&sna->flush_pixmaps); list_init(&sna->active_pixmaps); - AddGeneralSocket(sna->kgem.fd); + SetNotifyFd(sna->kgem.fd, sna_accel_notify, X_NOTIFY_READ, sna); #ifdef DEBUG_MEMORY sna->timer_expire[DEBUG_MEMORY_TIMER] = GetTimeInMillis()+ 10 * 1000; @@ -18214,7 +18221,7 @@ void sna_accel_close(struct sna *sna) sna_pixmap_expire(sna); DeleteCallback(&FlushCallback, sna_accel_flush_callback, sna); - RemoveGeneralSocket(sna->kgem.fd); + RemoveNotifyFd(sna->kgem.fd); kgem_cleanup_cache(&sna->kgem); } |