Rename RenderResult::Error to Skipped
Browse files at this commit8b5acd5e6ef40f6122ba43711a462ac8d8c7f6e7Parent: 31bb9093 changed files +6 -6
- src/backend/mod.rs +2 -2
- src/backend/tty.rs +1 -1
- src/niri.rs +3 -3
src/backend/mod.rsmodified+2 -2
| @@ -26,8 +26,8 @@ pub enum RenderResult { | ||
| 26 | 26 | Submitted, |
| 27 | 27 | /// Rendering succeeded, but there was no damage. |
| 28 | 28 | NoDamage, |
| 29 | - /// An error has occurred, the frame was not submitted. | |
| 30 | - Error, | |
| 29 | + /// The frame was not rendered and submitted, due to an error or otherwise. | |
| 30 | + Skipped, | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | impl Backend { |
src/backend/tty.rsmodified+1 -1
| @@ -872,7 +872,7 @@ impl Tty { | ||
| 872 | 872 | ) -> RenderResult { |
| 873 | 873 | let span = tracy_client::span!("Tty::render"); |
| 874 | 874 | |
| 875 | - let mut rv = RenderResult::Error; | |
| 875 | + let mut rv = RenderResult::Skipped; | |
| 876 | 876 | |
| 877 | 877 | let Some(device) = self.output_device.as_mut() else { |
| 878 | 878 | error!("missing output device"); |
src/niri.rsmodified+3 -3
| @@ -1629,7 +1629,7 @@ impl Niri { | ||
| 1629 | 1629 | |
| 1630 | 1630 | let target_presentation_time = state.frame_clock.next_presentation_time(); |
| 1631 | 1631 | |
| 1632 | - let mut res = RenderResult::Error; | |
| 1632 | + let mut res = RenderResult::Skipped; | |
| 1633 | 1633 | if self.monitors_active { |
| 1634 | 1634 | // Update from the config and advance the animations. |
| 1635 | 1635 | self.layout.advance_animations(target_presentation_time); |
| @@ -1651,7 +1651,7 @@ impl Niri { | ||
| 1651 | 1651 | let is_locked = self.is_locked(); |
| 1652 | 1652 | let state = self.output_state.get_mut(output).unwrap(); |
| 1653 | 1653 | |
| 1654 | - if res == RenderResult::Error { | |
| 1654 | + if res == RenderResult::Skipped { | |
| 1655 | 1655 | // Update the redraw state on failed render. |
| 1656 | 1656 | state.redraw_state = |
| 1657 | 1657 | if let RedrawState::WaitingForEstimatedVBlank(token) |
| @@ -1674,7 +1674,7 @@ impl Niri { | ||
| 1674 | 1674 | // If we're in process of locking the session, check if the requirements were met. |
| 1675 | 1675 | match mem::take(&mut self.lock_state) { |
| 1676 | 1676 | LockState::Locking(confirmation) => { |
| 1677 | - if res == RenderResult::Error { | |
| 1677 | + if res == RenderResult::Skipped { | |
| 1678 | 1678 | if state.lock_render_state == LockRenderState::Unlocked { |
| 1679 | 1679 | // We needed to render a locked frame on this output but failed. |
| 1680 | 1680 | self.unlock(); |