Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeissl committed Nov 3, 2024
1 parent 5e137dc commit 542a21a
Show file tree
Hide file tree
Showing 11 changed files with 1,627 additions and 963 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
8 changes: 3 additions & 5 deletions anvil/src/render.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use smithay::{
backend::renderer::{
damage::{Error as OutputDamageTrackerError, OutputDamageTracker, RenderOutputResult},
element::{
damage::{Error as OutputDamageTrackerError, OutputDamageTracker, RenderOutputResult}, element::{
surface::WaylandSurfaceRenderElement,
utils::{
ConstrainAlign, ConstrainScaleBehavior, CropRenderElement, RelocateRenderElement,
RescaleRenderElement,
},
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 +140,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
Loading

0 comments on commit 542a21a

Please sign in to comment.