Skip to content

Commit 8db29b7

Browse files
committed
kms/surface: Don't attempt to use overlay planes during animations
1 parent 4d61d2a commit 8db29b7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/backend/kms/surface/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,9 @@ impl SurfaceThreadState {
973973
let mut additional_frame_flags = FrameFlags::empty();
974974
let mut remove_frame_flags = FrameFlags::empty();
975975

976-
let (has_active_fullscreen, fullscreen_drives_refresh_rate) = {
976+
let (has_active_fullscreen, fullscreen_drives_refresh_rate, animations_going) = {
977977
let shell = self.shell.read();
978+
let animations_going = shell.animations_going();
978979
let output = self.mirroring.as_ref().unwrap_or(&self.output);
979980
if let Some((_, workspace)) = shell.workspaces.active(output) {
980981
if let Some(fullscreen_surface) = workspace.get_fullscreen() {
@@ -985,17 +986,18 @@ impl SurfaceThreadState {
985986
recursive_frame_time_estimation(&self.clock, &*surface)
986987
.is_some_and(|dur| dur <= _30_FPS)
987988
}),
989+
animations_going,
988990
)
989991
} else {
990-
(false, false)
992+
(false, false, animations_going)
991993
}
992994
} else {
993-
(false, false)
995+
(false, false, animations_going)
994996
}
995997
};
996998

997-
if has_active_fullscreen {
998-
// skip overlay plane assign if we have a fullscreen surface to save on tests
999+
if has_active_fullscreen || animations_going {
1000+
// skip overlay plane assign if we have a fullscreen surface or dynamic contents to save on tests
9991001
remove_frame_flags |= FrameFlags::ALLOW_OVERLAY_PLANE_SCANOUT;
10001002
}
10011003

0 commit comments

Comments
 (0)