kms: Optimize buffer imports to secondary gpus
This commit is contained in:
parent
7de8d6e979
commit
46e679ec92
3 changed files with 76 additions and 41 deletions
|
|
@ -598,6 +598,15 @@ impl Shell {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn outputs_for_surface(&self, surface: &WlSurface) -> impl Iterator<Item=Output> {
|
||||
self.space_for_surface(surface)
|
||||
.and_then(|w| if let Some(window) = w.space.window_for_surface(surface, WindowSurfaceType::ALL) {
|
||||
Some(w.space.outputs_for_window(&window).into_iter())
|
||||
} else { None })
|
||||
.into_iter()
|
||||
.flatten()
|
||||
}
|
||||
|
||||
pub fn space_for_surface(&self, surface: &WlSurface) -> Option<&Workspace> {
|
||||
self.spaces.iter().find(|workspace| {
|
||||
workspace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue