Rename RenderResult::Error to Skipped

This commit is contained in:
Ivan Molodetskikh
2024-01-03 11:31:04 +04:00
parent 31bb9096e2
commit 8b5acd5e6e
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ pub enum RenderResult {
Submitted,
/// Rendering succeeded, but there was no damage.
NoDamage,
/// An error has occurred, the frame was not submitted.
Error,
/// The frame was not rendered and submitted, due to an error or otherwise.
Skipped,
}
impl Backend {
+1 -1
View File
@@ -872,7 +872,7 @@ impl Tty {
) -> RenderResult {
let span = tracy_client::span!("Tty::render");
let mut rv = RenderResult::Error;
let mut rv = RenderResult::Skipped;
let Some(device) = self.output_device.as_mut() else {
error!("missing output device");
+3 -3
View File
@@ -1629,7 +1629,7 @@ impl Niri {
let target_presentation_time = state.frame_clock.next_presentation_time();
let mut res = RenderResult::Error;
let mut res = RenderResult::Skipped;
if self.monitors_active {
// Update from the config and advance the animations.
self.layout.advance_animations(target_presentation_time);
@@ -1651,7 +1651,7 @@ impl Niri {
let is_locked = self.is_locked();
let state = self.output_state.get_mut(output).unwrap();
if res == RenderResult::Error {
if res == RenderResult::Skipped {
// Update the redraw state on failed render.
state.redraw_state =
if let RedrawState::WaitingForEstimatedVBlank(token)
@@ -1674,7 +1674,7 @@ impl Niri {
// If we're in process of locking the session, check if the requirements were met.
match mem::take(&mut self.lock_state) {
LockState::Locking(confirmation) => {
if res == RenderResult::Error {
if res == RenderResult::Skipped {
if state.lock_render_state == LockRenderState::Unlocked {
// We needed to render a locked frame on this output but failed.
self.unlock();