aboutsummaryrefslogtreecommitdiff
path: root/src/render_helpers/crossfade.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-04-18 21:39:27 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-04-18 21:39:27 +0400
commit0fcd981b86029ce4a554bf4805221a104a9228a7 (patch)
treeae6e14149f8ac310c023658b7f3a07297c45e308 /src/render_helpers/crossfade.rs
parent5c4153e26b6170fff52d015687a19673bb7d3a4e (diff)
downloadniri-0fcd981b86029ce4a554bf4805221a104a9228a7.tar.gz
niri-0fcd981b86029ce4a554bf4805221a104a9228a7.tar.bz2
niri-0fcd981b86029ce4a554bf4805221a104a9228a7.zip
Fix crop + crossfade artifacts
Diffstat (limited to 'src/render_helpers/crossfade.rs')
-rw-r--r--src/render_helpers/crossfade.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render_helpers/crossfade.rs b/src/render_helpers/crossfade.rs
index 65f96482..62d72cb2 100644
--- a/src/render_helpers/crossfade.rs
+++ b/src/render_helpers/crossfade.rs
@@ -36,6 +36,11 @@ impl CrossfadeRenderElement {
let tex_to_geo = texture_to_geo.to_f64().upscale(scale_to);
let combined_geo = tex_from_geo.merge(tex_to_geo);
+ let size = combined_geo
+ .size
+ .to_logical(1.)
+ .to_buffer(1., Transform::Normal);
+
let area = Rectangle::from_loc_and_size(
area.loc + combined_geo.loc.to_logical(scale).to_i32_round(),
combined_geo.size.to_logical(scale).to_i32_round(),
@@ -57,6 +62,7 @@ impl CrossfadeRenderElement {
(String::from("tex_to"), texture_to),
]),
area,
+ size,
None,
result_alpha,
vec![