Skip to content

Commit

Permalink
anvil: Adopt drm changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Nov 28, 2024
1 parent b3f43fa commit 8161583
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 353 deletions.
7 changes: 3 additions & 4 deletions anvil/src/drawing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use smithay::{
memory::{MemoryRenderBuffer, MemoryRenderBufferRenderElement},
surface::WaylandSurfaceRenderElement,
AsRenderElements, Kind,
},
ImportAll, ImportMem, Renderer, Texture,
}, Color32F, ImportAll, ImportMem, Renderer, Texture
},
input::pointer::CursorImageStatus,
render_elements,
Expand All @@ -23,8 +22,8 @@ use smithay::{
utils::{Buffer, Logical, Rectangle, Size, Transform},
};

pub static CLEAR_COLOR: [f32; 4] = [0.8, 0.8, 0.9, 1.0];
pub static CLEAR_COLOR_FULLSCREEN: [f32; 4] = [0.0, 0.0, 0.0, 0.0];
pub static CLEAR_COLOR: Color32F = Color32F::new(0.8, 0.8, 0.9, 1.0);
pub static CLEAR_COLOR_FULLSCREEN: Color32F = Color32F::new(0.0, 0.0, 0.0, 0.0);

pub struct PointerElement {
buffer: Option<MemoryRenderBuffer>,
Expand Down
6 changes: 3 additions & 3 deletions anvil/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithay::{
},
AsRenderElements, RenderElement, Wrap,
},
ImportAll, ImportMem, Renderer,
Color32F, ImportAll, ImportMem, Renderer,
},
desktop::space::{
constrain_space_element, ConstrainBehavior, ConstrainReference, Space, SpaceRenderElements,
Expand Down Expand Up @@ -142,7 +142,7 @@ pub fn output_elements<R>(
custom_elements: impl IntoIterator<Item = CustomRenderElements<R>>,
renderer: &mut R,
show_window_preview: bool,
) -> (Vec<OutputRenderElements<R, WindowRenderElement<R>>>, [f32; 4])
) -> (Vec<OutputRenderElements<R, WindowRenderElement<R>>>, Color32F)
where
R: Renderer + ImportAll + ImportMem,
R::TextureId: Clone + 'static,
Expand Down Expand Up @@ -198,7 +198,7 @@ pub fn render_output<'a, 'd, R>(
damage_tracker: &'d mut OutputDamageTracker,
age: usize,
show_window_preview: bool,
) -> Result<RenderOutputResult<'d>, OutputDamageTrackerError<R>>
) -> Result<RenderOutputResult<'d>, OutputDamageTrackerError<R::Error>>
where
R: Renderer + ImportAll + ImportMem,
R::TextureId: Clone + 'static,
Expand Down
Loading

0 comments on commit 8161583

Please sign in to comment.