mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
Rename RenderResult::Error to Skipped
This commit is contained in:
+2
-2
@@ -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
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user