metal: implement direct scanout
This commit is contained in:
parent
fed2ceb8b5
commit
da84e9ec27
25 changed files with 682 additions and 148 deletions
|
|
@ -80,7 +80,7 @@ pub async fn output_render_data(state: Rc<State>) {
|
|||
impl OutputNode {
|
||||
pub fn perform_screencopies(
|
||||
&self,
|
||||
fb: &dyn GfxFramebuffer,
|
||||
fb: Option<&dyn GfxFramebuffer>,
|
||||
tex: &Rc<dyn GfxTexture>,
|
||||
render_hardware_cursor: bool,
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use {
|
|||
ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
|
||||
ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1,
|
||||
wl_seat::{collect_kb_foci, collect_kb_foci2, NodeSeatState, SeatId},
|
||||
wl_surface::WlSurface,
|
||||
},
|
||||
rect::Rect,
|
||||
state::State,
|
||||
|
|
@ -161,6 +162,10 @@ pub trait ToplevelNode: Node {
|
|||
fn tl_last_active_child(self: Rc<Self>) -> Rc<dyn ToplevelNode> {
|
||||
self.tl_into_dyn()
|
||||
}
|
||||
|
||||
fn tl_scanout_surface(&self) -> Option<Rc<WlSurface>> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FullscreenedData {
|
||||
|
|
@ -356,8 +361,8 @@ impl ToplevelData {
|
|||
});
|
||||
drop(data);
|
||||
self.is_fullscreen.set(true);
|
||||
ws.set_fullscreen_node(&node);
|
||||
node.tl_set_parent(ws.clone());
|
||||
ws.set_fullscreen_node(&node);
|
||||
node.clone().tl_set_workspace(ws);
|
||||
node.clone()
|
||||
.tl_change_extents(&ws.output.get().global.pos.get());
|
||||
|
|
|
|||
|
|
@ -143,6 +143,11 @@ impl WorkspaceNode {
|
|||
if plane_was_visible {
|
||||
self.plane_set_visible(false);
|
||||
}
|
||||
if let Some(surface) = node.tl_scanout_surface() {
|
||||
if let Some(fb) = self.output.get().global.connector.connector.drm_feedback() {
|
||||
surface.send_feedback(&fb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_fullscreen_node(&self) {
|
||||
|
|
@ -151,6 +156,11 @@ impl WorkspaceNode {
|
|||
if self.visible.get() {
|
||||
self.plane_set_visible(true);
|
||||
}
|
||||
if let Some(surface) = node.tl_scanout_surface() {
|
||||
if let Some(fb) = surface.client.state.drm_feedback.get() {
|
||||
surface.send_feedback(&fb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue