diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-16 11:20:12 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-03-16 17:57:51 +0100 |
commit | c740fccc9dd0913908c0632c10f8c6d10b2b1ca4 (patch) | |
tree | 366ccd1e4ee12fa302b2f366d290a8053c19b106 | |
parent | 7720dde74d5abc784568d99c3f338086c128a07c (diff) |
Fix buffer blit matrices
There was a missing wlr_matrix_scale call, so we ended up with black
frames.
Closes: https://github.com/swaywm/wlroots/issues/2780
-rw-r--r-- | backend/drm/renderer.c | 1 | ||||
-rw-r--r-- | types/wlr_screencopy_v1.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index 260d041f..2793c00b 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -157,6 +157,7 @@ static struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf, float mat[9]; wlr_matrix_identity(mat); + wlr_matrix_scale(mat, surf->width, surf->height); wlr_renderer_begin(renderer, surf->width, surf->height); wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 0.0 }); diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c index 9de3172c..87f3127f 100644 --- a/types/wlr_screencopy_v1.c +++ b/types/wlr_screencopy_v1.c @@ -287,6 +287,7 @@ static bool blit_dmabuf(struct wlr_renderer *renderer, float mat[9]; wlr_matrix_identity(mat); + wlr_matrix_scale(mat, dst_buffer->width, dst_buffer->height); wlr_renderer_begin(renderer, dst_buffer->width, dst_buffer->height); wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 0.0 }); |