Skip to content

Commit

Permalink
Add disable-cursor-plane debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Jan 3, 2024
1 parent be6e25f commit 628891d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/backend/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@ impl Tty {
planes.overlay.clear();
}

// Cursor planes have bugs on some systems.
let cursor_plane_gbm = if config.debug.disable_cursor_plane {
None
} else {
Some(device.gbm.clone())
};

let egl_context = device.gles.egl_context();
let texture_formats = egl_context.dmabuf_texture_formats();
let render_formats = egl_context.dmabuf_render_formats();
Expand All @@ -596,7 +603,7 @@ impl Tty {
SUPPORTED_COLOR_FORMATS,
render_formats.clone(),
device.drm.cursor_size(),
Some(device.gbm.clone()),
cursor_plane_gbm,
)?;

let dmabuf_feedback = DmabufFeedbackBuilder::new(device.id, texture_formats.clone())
Expand Down
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ pub struct DebugConfig {
pub enable_color_transformations_capability: bool,
#[knuffel(child)]
pub enable_overlay_planes: bool,
#[knuffel(child)]
pub disable_cursor_plane: bool,
}

impl Default for DebugConfig {
Expand All @@ -389,6 +391,7 @@ impl Default for DebugConfig {
wait_for_frame_completion_before_queueing: false,
enable_color_transformations_capability: false,
enable_overlay_planes: false,
disable_cursor_plane: false,
}
}
}
Expand Down

0 comments on commit 628891d

Please sign in to comment.