render: hide graphics API behind traits
This commit is contained in:
parent
d650b3375d
commit
24e410a5b5
40 changed files with 601 additions and 246 deletions
|
|
@ -3,7 +3,7 @@ use {
|
|||
backend::KeyState,
|
||||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
gfx_apis::gl::Texture,
|
||||
gfx_api::GfxTexture,
|
||||
ifs::wl_seat::{
|
||||
collect_kb_foci, collect_kb_foci2, wl_pointer::PendingScroll, NodeSeatState, SeatId,
|
||||
WlSeatGlobal, BTN_LEFT,
|
||||
|
|
@ -77,7 +77,7 @@ tree_id!(ContainerNodeId);
|
|||
pub struct ContainerTitle {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub tex: Rc<Texture>,
|
||||
pub tex: Rc<dyn GfxTexture>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use {
|
|||
backend::KeyState,
|
||||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
gfx_apis::gl::Texture,
|
||||
gfx_api::GfxTexture,
|
||||
ifs::wl_seat::{NodeSeatState, SeatId, WlSeatGlobal, BTN_LEFT},
|
||||
rect::Rect,
|
||||
renderer::Renderer,
|
||||
|
|
@ -44,7 +44,7 @@ pub struct FloatNode {
|
|||
pub layout_scheduled: Cell<bool>,
|
||||
pub render_titles_scheduled: Cell<bool>,
|
||||
pub title: RefCell<String>,
|
||||
pub title_textures: CopyHashMap<Scale, Rc<Texture>>,
|
||||
pub title_textures: CopyHashMap<Scale, Rc<dyn GfxTexture>>,
|
||||
seats: RefCell<AHashMap<SeatId, SeatState>>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
client::ClientId,
|
||||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
gfx_apis::gl::{Framebuffer, Texture},
|
||||
gfx_api::{GfxFramebuffer, GfxTexture},
|
||||
ifs::{
|
||||
jay_output::JayOutput,
|
||||
jay_screencast::JayScreencast,
|
||||
|
|
@ -78,7 +78,7 @@ pub async fn output_render_data(state: Rc<State>) {
|
|||
}
|
||||
|
||||
impl OutputNode {
|
||||
pub fn perform_screencopies(&self, fb: &Framebuffer, tex: &Rc<Texture>) {
|
||||
pub fn perform_screencopies(&self, fb: &dyn GfxFramebuffer, tex: &Rc<dyn GfxTexture>) {
|
||||
if let Some(workspace) = self.workspace.get() {
|
||||
if !workspace.capture.get() {
|
||||
return;
|
||||
|
|
@ -465,14 +465,14 @@ pub struct OutputTitle {
|
|||
pub x2: i32,
|
||||
pub tex_x: i32,
|
||||
pub tex_y: i32,
|
||||
pub tex: Rc<Texture>,
|
||||
pub tex: Rc<dyn GfxTexture>,
|
||||
pub ws: Rc<WorkspaceNode>,
|
||||
}
|
||||
|
||||
pub struct OutputStatus {
|
||||
pub tex_x: i32,
|
||||
pub tex_y: i32,
|
||||
pub tex: Rc<Texture>,
|
||||
pub tex: Rc<dyn GfxTexture>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use {
|
|||
client::Client,
|
||||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
gfx_apis::gl::Texture,
|
||||
gfx_api::GfxTexture,
|
||||
ifs::wl_seat::{NodeSeatState, WlSeatGlobal},
|
||||
rect::Rect,
|
||||
renderer::Renderer,
|
||||
|
|
@ -25,7 +25,7 @@ pub struct PlaceholderNode {
|
|||
id: PlaceholderNodeId,
|
||||
toplevel: ToplevelData,
|
||||
destroyed: Cell<bool>,
|
||||
pub textures: SmallMap<Scale, Rc<Texture>, 2>,
|
||||
pub textures: SmallMap<Scale, Rc<dyn GfxTexture>, 2>,
|
||||
}
|
||||
|
||||
impl PlaceholderNode {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue