output: add damage tracking via buffer age

This commit is contained in:
emersion 2018-01-21 00:06:35 +01:00
parent 78c13ead16
commit 0365b587f0
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
21 changed files with 163 additions and 81 deletions

View file

@ -5,6 +5,8 @@
#include <pixman.h>
#include <wayland-server.h>
#define ROOTS_OUTPUT_PREVIOUS_DAMAGE_LEN 2
struct roots_desktop;
struct roots_output {
@ -15,9 +17,12 @@ struct roots_output {
struct roots_view *fullscreen_view;
struct timespec last_frame;
pixman_region32_t damage, previous_damage;
pixman_region32_t damage;
bool frame_pending;
pixman_region32_t previous_damage[ROOTS_OUTPUT_PREVIOUS_DAMAGE_LEN];
size_t previous_damage_idx;
struct wl_listener frame;
struct wl_listener mode;
struct wl_listener needs_swap;