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

@ -56,7 +56,7 @@ static void handle_output_frame(struct output_state *output,
struct sample_state *sample = state->data;
struct wlr_output *wlr_output = output->output;
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
glClearColor(sample->clear_color[0], sample->clear_color[1],
sample->clear_color[2], sample->clear_color[3]);

View file

@ -100,7 +100,7 @@ static void handle_output_frame(struct output_state *output,
struct sample_state *sample = state->data;
struct wlr_output *wlr_output = output->output;
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
wlr_renderer_begin(sample->renderer, wlr_output);
animate_cat(sample, output->output);

View file

@ -85,7 +85,7 @@ static void handle_output_frame(struct output_state *output,
struct sample_state *sample = state->data;
struct wlr_output *wlr_output = output->output;
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
glClearColor(sample->clear_color[0], sample->clear_color[1],
sample->clear_color[2], sample->clear_color[3]);

View file

@ -42,7 +42,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
int32_t width, height;
wlr_output_effective_resolution(wlr_output, &width, &height);
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
wlr_renderer_begin(sample->renderer, wlr_output);
float matrix[16];

View file

@ -35,7 +35,7 @@ void handle_output_frame(struct output_state *output, struct timespec *ts) {
sample->dec = inc;
}
wlr_output_make_current(output->output);
wlr_output_make_current(output->output, NULL);
glClearColor(sample->color[0], sample->color[1], sample->color[2], 1.0);
glClear(GL_COLOR_BUFFER_BIT);

View file

@ -42,7 +42,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
int32_t width, height;
wlr_output_effective_resolution(wlr_output, &width, &height);
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
wlr_renderer_begin(sample->renderer, wlr_output);
float matrix[16], view[16];

View file

@ -41,7 +41,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
int32_t width, height;
wlr_output_effective_resolution(wlr_output, &width, &height);
wlr_output_make_current(wlr_output);
wlr_output_make_current(wlr_output, NULL);
wlr_renderer_begin(sample->renderer, wlr_output);
float matrix[16];