Add disable-cursor-plane debug flag
Browse files at this commit628891db2c8b0467f5dcf1f82be6db1570fea84bParent: be6e25f2 changed files +11 -1
- src/backend/tty.rs +8 -1
- src/config.rs +3 -0
src/backend/tty.rsmodified+8 -1
| @@ -573,6 +573,13 @@ impl Tty { | |||
| 573 | planes.overlay.clear(); | 573 | planes.overlay.clear(); |
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | + // Cursor planes have bugs on some systems. | ||
| 577 | + let cursor_plane_gbm = if config.debug.disable_cursor_plane { | ||
| 578 | + None | ||
| 579 | + } else { | ||
| 580 | + Some(device.gbm.clone()) | ||
| 581 | + }; | ||
| 582 | + | ||
| 576 | let egl_context = device.gles.egl_context(); | 583 | let egl_context = device.gles.egl_context(); |
| 577 | let texture_formats = egl_context.dmabuf_texture_formats(); | 584 | let texture_formats = egl_context.dmabuf_texture_formats(); |
| 578 | let render_formats = egl_context.dmabuf_render_formats(); | 585 | let render_formats = egl_context.dmabuf_render_formats(); |
| @@ -596,7 +603,7 @@ impl Tty { | |||
| 596 | SUPPORTED_COLOR_FORMATS, | 603 | SUPPORTED_COLOR_FORMATS, |
| 597 | render_formats.clone(), | 604 | render_formats.clone(), |
| 598 | device.drm.cursor_size(), | 605 | device.drm.cursor_size(), |
| 599 | - Some(device.gbm.clone()), | 606 | + cursor_plane_gbm, |
| 600 | )?; | 607 | )?; |
| 601 | 608 | ||
| 602 | let dmabuf_feedback = DmabufFeedbackBuilder::new(device.id, texture_formats.clone()) | 609 | let dmabuf_feedback = DmabufFeedbackBuilder::new(device.id, texture_formats.clone()) |
src/config.rsmodified+3 -0
| @@ -379,6 +379,8 @@ pub struct DebugConfig { | |||
| 379 | pub enable_color_transformations_capability: bool, | 379 | pub enable_color_transformations_capability: bool, |
| 380 | #[knuffel(child)] | 380 | #[knuffel(child)] |
| 381 | pub enable_overlay_planes: bool, | 381 | pub enable_overlay_planes: bool, |
| 382 | + #[knuffel(child)] | ||
| 383 | + pub disable_cursor_plane: bool, | ||
| 382 | } | 384 | } |
| 383 | 385 | ||
| 384 | impl Default for DebugConfig { | 386 | impl Default for DebugConfig { |
| @@ -389,6 +391,7 @@ impl Default for DebugConfig { | |||
| 389 | wait_for_frame_completion_before_queueing: false, | 391 | wait_for_frame_completion_before_queueing: false, |
| 390 | enable_color_transformations_capability: false, | 392 | enable_color_transformations_capability: false, |
| 391 | enable_overlay_planes: false, | 393 | enable_overlay_planes: false, |
| 394 | + disable_cursor_plane: false, | ||
| 392 | } | 395 | } |
| 393 | } | 396 | } |
| 394 | } | 397 | } |