summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/grdev.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-10-02 17:59:26 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-10-03 15:57:00 +0200
commitaec3f44651998211d559b474bb830aad65680a62 (patch)
tree633953f3668928f2403285d69ddd8945a737475e /src/libsystemd-terminal/grdev.c
parent6a15ce2b3eb852023d77787f96c6a4a72eb4d60d (diff)
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.
Diffstat (limited to 'src/libsystemd-terminal/grdev.c')
-rw-r--r--src/libsystemd-terminal/grdev.c2
1 files changed, 2 insertions, 0 deletions
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 */