forge
Explore
Log in

Don't you dare go Hollow

Rename RenderResult::Error to Skipped

Browse files at this commit

8b5acd5e6ef40f6122ba43711a462ac8d8c7f6e7Ivan MolodetskikhParent: 31bb909
src/backend/mod.rsmodified+2 -2
@@ -26,8 +26,8 @@ pub enum RenderResult {
2626 Submitted,
2727 /// Rendering succeeded, but there was no damage.
2828 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,
3131 }
3232
3333 impl Backend {
src/backend/tty.rsmodified+1 -1
@@ -872,7 +872,7 @@ impl Tty {
872872 ) -> RenderResult {
873873 let span = tracy_client::span!("Tty::render");
874874
875- let mut rv = RenderResult::Error;
875+ let mut rv = RenderResult::Skipped;
876876
877877 let Some(device) = self.output_device.as_mut() else {
878878 error!("missing output device");
src/niri.rsmodified+3 -3
@@ -1629,7 +1629,7 @@ impl Niri {
16291629
16301630 let target_presentation_time = state.frame_clock.next_presentation_time();
16311631
1632- let mut res = RenderResult::Error;
1632+ let mut res = RenderResult::Skipped;
16331633 if self.monitors_active {
16341634 // Update from the config and advance the animations.
16351635 self.layout.advance_animations(target_presentation_time);
@@ -1651,7 +1651,7 @@ impl Niri {
16511651 let is_locked = self.is_locked();
16521652 let state = self.output_state.get_mut(output).unwrap();
16531653
1654- if res == RenderResult::Error {
1654+ if res == RenderResult::Skipped {
16551655 // Update the redraw state on failed render.
16561656 state.redraw_state =
16571657 if let RedrawState::WaitingForEstimatedVBlank(token)
@@ -1674,7 +1674,7 @@ impl Niri {
16741674 // If we're in process of locking the session, check if the requirements were met.
16751675 match mem::take(&mut self.lock_state) {
16761676 LockState::Locking(confirmation) => {
1677- if res == RenderResult::Error {
1677+ if res == RenderResult::Skipped {
16781678 if state.lock_render_state == LockRenderState::Unlocked {
16791679 // We needed to render a locked frame on this output but failed.
16801680 self.unlock();