Add COSMIC_DISABLE_DIRECT_SCANOUT env var

Like `anvil`. Useful for testing and working around issues.
This commit is contained in:
Ian Douglas Scott 2024-10-14 19:49:45 -07:00 committed by Victoria Brekenfeld
parent 087be20365
commit b8c429facb

View file

@ -624,7 +624,10 @@ impl SurfaceThreadState {
cursor_size, cursor_size,
Some(gbm), Some(gbm),
) { ) {
Ok(compositor) => { Ok(mut compositor) => {
if crate::utils::env::bool_var("COSMIC_DISABLE_DIRECT_SCANOUT").unwrap_or(false) {
compositor.use_direct_scanout(false);
}
self.active.store(true, Ordering::SeqCst); self.active.store(true, Ordering::SeqCst);
self.compositor = Some(compositor); self.compositor = Some(compositor);
Ok(()) Ok(())