render: Make blur_strength configurable
This commit is contained in:
parent
1c5ef576f4
commit
de8b47839c
11 changed files with 119 additions and 27 deletions
|
|
@ -185,6 +185,7 @@ pub fn draw_surface_cursor<R>(
|
|||
surface: &wl_surface::WlSurface,
|
||||
location: Point<f64, Logical>,
|
||||
scale: impl Into<Scale<f64>>,
|
||||
blur_strength: usize,
|
||||
push: &mut dyn FnMut(CursorRenderElement<R>, Point<i32, Physical>),
|
||||
) where
|
||||
R: Renderer + ImportAll + AsGlowRenderer,
|
||||
|
|
@ -211,6 +212,7 @@ pub fn draw_surface_cursor<R>(
|
|||
1.0,
|
||||
false,
|
||||
[0; 4],
|
||||
blur_strength,
|
||||
Kind::Cursor,
|
||||
&mut |elem| push(elem.into(), h),
|
||||
None,
|
||||
|
|
@ -223,6 +225,7 @@ pub fn draw_dnd_icon<R>(
|
|||
surface: &wl_surface::WlSurface,
|
||||
location: Point<f64, Logical>,
|
||||
scale: impl Into<Scale<f64>>,
|
||||
blur_strength: usize,
|
||||
push: &mut dyn FnMut(SurfaceRenderElement<R>),
|
||||
) where
|
||||
R: Renderer + ImportAll + AsGlowRenderer,
|
||||
|
|
@ -244,6 +247,7 @@ pub fn draw_dnd_icon<R>(
|
|||
1.0,
|
||||
false,
|
||||
[0; 4],
|
||||
blur_strength,
|
||||
FRAME_TIME_FILTER,
|
||||
push,
|
||||
None,
|
||||
|
|
@ -330,6 +334,7 @@ pub fn draw_cursor<R>(
|
|||
scale: Scale<f64>,
|
||||
buffer_scale: f64,
|
||||
time: Time<Monotonic>,
|
||||
blur_strength: usize,
|
||||
draw_default: bool,
|
||||
push: &mut dyn FnMut(CursorRenderElement<R>, Point<i32, Physical>),
|
||||
) where
|
||||
|
|
@ -406,7 +411,7 @@ pub fn draw_cursor<R>(
|
|||
hotspot.to_physical_precise_round(scale),
|
||||
);
|
||||
} else if let CursorImageStatus::Surface(ref wl_surface) = cursor_status {
|
||||
draw_surface_cursor(renderer, wl_surface, location, scale, push);
|
||||
draw_surface_cursor(renderer, wl_surface, location, scale, blur_strength, push);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue