Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernat committed Jan 2, 2024
1 parent 3e9627f commit 40de94c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ use gbm::{BufferObject, BufferObjectFlags, Format as BufferFormat, Surface};

enum DisplayState {
Init,
// NOTE(mbernat): Buffer objects obtained from a surface
// return to the surface's queue when dropped, so we need to store them here.
//
// Unfortunately, this behavior is not very well documented,
// see `Surface::lock_front_buffer()` implementation for details.
ModeSet { _buffer_object: BufferObject<FramebufferHandle> },
PageFlipped { _buffer_object: BufferObject<FramebufferHandle> },
}

pub struct Window {
pub(crate) gbm_surface: Surface<FramebufferHandle>,
pub(crate) drm_display: DrmDisplay,
// NOTE(mbernat): Buffer objects obtained from a surface
// return to the surface's queue when dropped.
//
// Unfortunately, this behavior is not very well documented,
// see `Surface::lock_front_buffer()` implementation for details.
display_state: DisplayState,
}

Expand All @@ -39,7 +39,7 @@ impl Window {
.create_surface(drm_display.width, drm_display.height, format, usage)
.expect("Could not create a GBM surface");

Window { gbm_surface, drm_display, display_state: DisplayState::Init } //, frame_count: 0, previous_buffer_object: None }
Window { gbm_surface, drm_display, display_state: DisplayState::Init }
}

/// # Safety
Expand Down

0 comments on commit 40de94c

Please sign in to comment.