kms: Drop early_import as it seems to hurt performance
This commit is contained in:
parent
1c3d45c155
commit
f9f8af10a0
2 changed files with 4 additions and 34 deletions
|
|
@ -1229,7 +1229,9 @@ impl Surface {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
self.pending = true;
|
self.pending = true;
|
||||||
}
|
}
|
||||||
Err(FrameError::EmptyFrame) => {}
|
Err(FrameError::EmptyFrame) => {
|
||||||
|
tracing::debug!("Stopped rendering");
|
||||||
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
return Err(err).with_context(|| "Failed to submit result for display")
|
return Err(err).with_context(|| "Failed to submit result for display")
|
||||||
}
|
}
|
||||||
|
|
@ -1517,19 +1519,6 @@ impl KmsState {
|
||||||
.copied()
|
.copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn try_early_import(
|
|
||||||
&mut self,
|
|
||||||
surface: &WlSurface,
|
|
||||||
output: &Output,
|
|
||||||
target: DrmNode,
|
|
||||||
shell: &Shell,
|
|
||||||
) {
|
|
||||||
let render = render_node_for_output(&output, self.primary_node, target, &shell);
|
|
||||||
if let Err(err) = self.api.early_import(render, surface) {
|
|
||||||
trace!(?err, "Early import failed.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn dmabuf_imported(
|
pub fn dmabuf_imported(
|
||||||
&mut self,
|
&mut self,
|
||||||
_client: Option<Client>,
|
_client: Option<Client>,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
shell::CosmicSurface,
|
shell::CosmicSurface, state::ClientState, utils::prelude::*,
|
||||||
state::{BackendData, ClientState},
|
|
||||||
utils::prelude::*,
|
|
||||||
wayland::protocols::screencopy::SessionType,
|
wayland::protocols::screencopy::SessionType,
|
||||||
};
|
};
|
||||||
use calloop::Interest;
|
use calloop::Interest;
|
||||||
|
|
@ -33,19 +31,6 @@ use std::sync::Mutex;
|
||||||
use super::screencopy::PendingScreencopyBuffers;
|
use super::screencopy::PendingScreencopyBuffers;
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
fn early_import_surface(&mut self, surface: &WlSurface) {
|
|
||||||
let mut import_nodes = std::collections::HashSet::new();
|
|
||||||
if let Some(output) = self.common.shell.visible_output_for_surface(&surface) {
|
|
||||||
if let BackendData::Kms(ref mut kms_state) = &mut self.backend {
|
|
||||||
if let Some(target) = kms_state.target_node_for_output(&output) {
|
|
||||||
if import_nodes.insert(target) {
|
|
||||||
kms_state.try_early_import(surface, &output, target, &self.common.shell);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn toplevel_ensure_initial_configure(&mut self, toplevel: &ToplevelSurface) -> bool {
|
fn toplevel_ensure_initial_configure(&mut self, toplevel: &ToplevelSurface) -> bool {
|
||||||
// send the initial configure if relevant
|
// send the initial configure if relevant
|
||||||
let initial_configure_sent = with_states(toplevel.wl_surface(), |states| {
|
let initial_configure_sent = with_states(toplevel.wl_surface(), |states| {
|
||||||
|
|
@ -225,10 +210,6 @@ impl CompositorHandler for State {
|
||||||
//handle window screencopy sessions
|
//handle window screencopy sessions
|
||||||
self.schedule_window_session(surface);
|
self.schedule_window_session(surface);
|
||||||
|
|
||||||
// We need to know every potential output for importing to the right gpu and scheduling a render,
|
|
||||||
// so call this only after every potential surface map operation has been done.
|
|
||||||
self.early_import_surface(surface);
|
|
||||||
|
|
||||||
// and refresh smithays internal state
|
// and refresh smithays internal state
|
||||||
self.common.shell.popups.commit(surface);
|
self.common.shell.popups.commit(surface);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue