kms: change from thread_local approach to wiring scanout node through function calls to detect scanout candidates
This commit is contained in:
parent
012c77ec81
commit
031fdc389a
12 changed files with 140 additions and 68 deletions
|
|
@ -943,6 +943,7 @@ impl LockedDevice<'_> {
|
|||
output,
|
||||
CursorMode::All,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.with_context(|| "Failed to render outputs")?,
|
||||
None => Vec::new(),
|
||||
|
|
|
|||
|
|
@ -978,6 +978,7 @@ impl KmsGuard<'_> {
|
|||
output,
|
||||
CursorMode::All,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.with_context(|| "Failed to render outputs")?;
|
||||
|
||||
|
|
@ -1088,6 +1089,7 @@ impl KmsGuard<'_> {
|
|||
output,
|
||||
CursorMode::All,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.with_context(|| "Failed to render outputs")?;
|
||||
|
||||
|
|
@ -1132,6 +1134,7 @@ impl KmsGuard<'_> {
|
|||
output,
|
||||
CursorMode::All,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.with_context(|| "Failed to render outputs")?;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
init_shaders, output_elements,
|
||||
},
|
||||
config::ScreenFilter,
|
||||
shell::{Shell, element::surface::ScanoutTargetNodeGuard},
|
||||
shell::Shell,
|
||||
state::SurfaceDmabufFeedback,
|
||||
utils::prelude::*,
|
||||
wayland::handlers::{
|
||||
|
|
@ -1057,24 +1057,22 @@ impl SurfaceThreadState {
|
|||
vrr = has_active_fullscreen;
|
||||
}
|
||||
|
||||
let mut elements = {
|
||||
let _scanout_node = ScanoutTargetNodeGuard::new(Some(self.target_node));
|
||||
output_elements(
|
||||
Some(&render_node),
|
||||
&mut renderer,
|
||||
&self.shell,
|
||||
self.clock.now(),
|
||||
self.mirroring.as_ref().unwrap_or(&self.output),
|
||||
CursorMode::All,
|
||||
#[cfg(not(feature = "debug"))]
|
||||
None,
|
||||
#[cfg(feature = "debug")]
|
||||
Some((&self.egui, &self.timings)),
|
||||
)
|
||||
.map_err(|err| {
|
||||
anyhow::format_err!("Failed to accumulate elements for rendering: {:?}", err)
|
||||
})?
|
||||
};
|
||||
let mut elements = output_elements(
|
||||
Some(&render_node),
|
||||
&mut renderer,
|
||||
&self.shell,
|
||||
self.clock.now(),
|
||||
self.mirroring.as_ref().unwrap_or(&self.output),
|
||||
CursorMode::All,
|
||||
#[cfg(not(feature = "debug"))]
|
||||
None,
|
||||
#[cfg(feature = "debug")]
|
||||
Some((&self.egui, &self.timings)),
|
||||
Some(self.target_node),
|
||||
)
|
||||
.map_err(|err| {
|
||||
anyhow::format_err!("Failed to accumulate elements for rendering: {:?}", err)
|
||||
})?;
|
||||
|
||||
if vrr && fullscreen_drives_refresh_rate && !self.timings.past_min_render_time(&self.clock)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue