diff options
author | Simon Ser <[email protected]> | 2021-11-26 10:26:01 +0100 |
---|---|---|
committer | Kirill Primak <[email protected]> | 2021-11-26 19:31:19 +0000 |
commit | d320c2acc3a5733e87a883f8c8f615799f019de7 (patch) | |
tree | 0587b8e5c91124be9e5b16f6995a249eab2a0660 | |
parent | f03e1ec21368105ebc0c5bce3a7464b3a7aa8bdc (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-- | wlr_scene.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wlr_scene.c b/wlr_scene.c index b6eed41..0343922 100644 --- a/wlr_scene.c +++ b/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); |