summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/grdev-internal.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-09-20 11:12:44 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-09-20 11:46:49 +0200
commit7b12a45b2dc6993e3f31642df2cc9b528294da40 (patch)
treeeb078293c036af47c7b817f3c7a95ae50601576e /src/libsystemd-terminal/grdev-internal.h
parent3ec19e5d91d3d705682fee62a509801737c56c1e (diff)
terminal: grdev: schedule virtual frame events if hw doesn't support it
Whenever we cannot use hardware frame events, we now schedule a virtual frame event to make sure applications don't have to do this. Usually, applications render only on data changes, but we can further reduce render-time by also limiting rendering to vsyncs.
Diffstat (limited to 'src/libsystemd-terminal/grdev-internal.h')
-rw-r--r--src/libsystemd-terminal/grdev-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-terminal/grdev-internal.h b/src/libsystemd-terminal/grdev-internal.h
index 96830a714c..f5915b16e8 100644
--- a/src/libsystemd-terminal/grdev-internal.h
+++ b/src/libsystemd-terminal/grdev-internal.h
@@ -142,9 +142,11 @@ struct grdev_pipe {
grdev_tile *tile;
grdev_display_cache *cache;
+ sd_event_source *vsync_src;
uint32_t width;
uint32_t height;
+ uint32_t vrefresh;
size_t max_fbs;
grdev_fb *front;
@@ -171,6 +173,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_pipe*, grdev_pipe_free);
void grdev_pipe_ready(grdev_pipe *pipe, bool running);
void grdev_pipe_frame(grdev_pipe *pipe);
+void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames);
/*
* Cards