diff options
author | emersion <contact@emersion.fr> | 2018-03-29 21:42:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 21:42:56 -0400 |
commit | 3d29d833b133d48abfa87c1a79d8fbb507fd1426 (patch) | |
tree | b8b52173a9791e3b13a0316ab9d316a80a6adc20 /sway/desktop | |
parent | 941ca5c8fd289b6ca0178f65b697aa36fb4e71d3 (diff) | |
parent | c8e7437b82a49d38f55d59b41d3bc2699fcae40d (diff) |
Merge pull request #1652 from ascent12/glclear
Clear buffer after beginning renderer
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 9e7fbcc6..b8253ace 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -197,14 +197,15 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { struct sway_output *soutput = wl_container_of(listener, soutput, frame); struct wlr_output *wlr_output = data; struct sway_server *server = soutput->server; - float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend); - wlr_renderer_clear(renderer, clear_color); int buffer_age = -1; wlr_output_make_current(wlr_output, &buffer_age); wlr_renderer_begin(server->renderer, wlr_output->width, wlr_output->height); + float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; + wlr_renderer_clear(renderer, clear_color); + struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); |