From aec3f44651998211d559b474bb830aad65680a62 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 2 Oct 2014 17:59:26 +0200 Subject: terminal/drm: provide pipe->target() callback Instead of looking for available back-buffers on each operation, set it to NULL and wait for the next frame request. It will call back into the pipe to request the back-buffer via ->target(), where we can do the same and look for an available backbuffer. This simplifies the code and avoids double lookups if we run short of buffers. --- src/libsystemd-terminal/grdev.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsystemd-terminal/grdev.c') diff --git a/src/libsystemd-terminal/grdev.c b/src/libsystemd-terminal/grdev.c index aaac06ec34..bbc45afad4 100644 --- a/src/libsystemd-terminal/grdev.c +++ b/src/libsystemd-terminal/grdev.c @@ -382,6 +382,8 @@ const grdev_display_target *grdev_display_next_target(grdev_display *display, co if (!(fb = pipe->back)) { if (!pipe->vtable->target || !(fb = pipe->vtable->target(pipe))) continue; + + assert(fb == pipe->back); } /* if back-buffer is up-to-date, schedule flip */ -- cgit v1.2.3-54-g00ecf