diff options
author | Simon Ser <contact@emersion.fr> | 2021-11-26 10:26:01 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@posteo.net> | 2021-11-26 19:31:19 +0000 |
commit | 254ab890e787ccee1e33fb420781c9696761ce3c (patch) | |
tree | fdd2d0f39061af359fbc7fb2536ba5547bb4e98f | |
parent | 83d78f9fd415a1110e888b3c5f9cc9fb79627217 (diff) |
scene: add support for viewporter
If the surface has a source box set, use that.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3172
-rw-r--r-- | types/scene/wlr_scene.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index b6eed417..03439223 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -715,7 +715,11 @@ static void render_node_iterator(struct wlr_scene_node *node, wlr_matrix_project_box(matrix, &dst_box, transform, 0.0, output->transform_matrix); - render_texture(output, output_damage, texture, NULL, &dst_box, matrix); + struct wlr_fbox src_box = {0}; + wlr_surface_get_buffer_source_box(surface, &src_box); + + render_texture(output, output_damage, texture, + &src_box, &dst_box, matrix); break; case WLR_SCENE_NODE_RECT:; struct wlr_scene_rect *scene_rect = scene_rect_from_node(node); |