diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-04 11:37:01 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-04 11:39:08 +0100 |
commit | ad774cf3a299b220f9f2a0bed52c8fa979959426 (patch) | |
tree | 3ef57500f2334191b253d2f2d6375b3f024eec98 /src/sna/sna_dri.c | |
parent | d2f19d5a1f4d1c9521fb4801c9fb649d19746150 (diff) |
sna/dri: Refine proposed async swap interface
The latest proposal for passing swap_interval==0 is through the normal
ScheduleSwap() call, so we can remove the specialised function.
Link: http://lists.x.org/archives/xorg-devel/2013-September/037661.html
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r-- | src/sna/sna_dri.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 0405186a..2527884f 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -2085,33 +2085,6 @@ skip: return TRUE; } -#if USE_ASYNC_SWAP -static Bool -sna_dri_async_swap(ClientPtr client, DrawablePtr draw, - DRI2BufferPtr front, DRI2BufferPtr back, - DRI2SwapEventPtr func, void *data) -{ - struct sna *sna = to_sna_from_drawable(draw); - CARD64 target_msc = 0; - int pipe; - - DBG(("%s()\n", __FUNCTION__)); - - if (!can_flip(sna, draw, front, back) || - (pipe = sna_dri_get_pipe(draw)) < 0 || - !sna_dri_schedule_flip(client, draw, front, back, pipe, - &target_msc, 0, 0, func, data)) { - DBG(("%s: unable to flip, so blit\n", __FUNCTION__)); - __sna_dri_copy_region(sna, draw, NULL, back, front, false); - - DRI2SwapComplete(client, draw, 0, 0, 0, - DRI2_BLIT_COMPLETE, func, data); - return false; - } - return TRUE; -} -#endif - static uint64_t gettime_us(void) { struct timespec tv; @@ -2353,7 +2326,7 @@ bool sna_dri_open(struct sna *sna, ScreenPtr screen) #if USE_ASYNC_SWAP info.version = 10; - info.AsyncSwap = sna_dri_async_swap; + info.scheduleSwap0 = 1; #endif return DRI2ScreenInit(screen, &info); |