Skip to content

Commit

Permalink
drm/compositor: Only skip cursor planes, when the content didn't change
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Meissl <[email protected]>
  • Loading branch information
Drakulix and cmeissl authored Nov 25, 2024
1 parent fb5a899 commit 2032f0c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/backend/drm/compositor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2667,21 +2667,21 @@ where
PrimaryPlaneElement::Element(primary_plane_scanout_element.unwrap())
};

// if the update only contains a cursor update, skip it for vrr
// if the update only contains a cursor position update, skip it for vrr
if self.vrr
&& allow_partial_update
&& next_frame_state.planes.iter().all(|(plane, state)| {
if self.planes.cursor.iter().any(|p| *plane == p.handle) {
!state.skip
} else {
state.skip
}
state.skip
|| (self.planes.cursor.iter().any(|p| *plane == p.handle)
&& state.buffer().map(|b| &b.fb)
== previous_state.plane_buffer(*plane).map(|b| &b.fb))
})
{
for (plane, state) in next_frame_state.planes.iter_mut() {
if self.planes.cursor.iter().any(|p| *plane == p.handle) {
state.skip = true;
}
for plane in self.planes.cursor.iter() {
let Some(state) = next_frame_state.plane_state_mut(plane.handle) else {
continue;
};
state.skip = true;
}
}

Expand Down

0 comments on commit 2032f0c

Please sign in to comment.