Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- shiftpaperd no longer needs a GPU with 16-bit normalised textures, as depth maps now go to the GPU as 16-bit floats.
- The renderer is now its own crate, `shiftpaper-render`, with no Wayland code, so other front ends can use it.
- A `parallax_intensity` above 0.05 zooms the wallpaper in a little more, so the biggest shifts no longer stretch its edges.
- `shiftpaper-render` can show any part of a wallpaper, zoomed in and moved, and pan across it, for front ends that let people frame their photos or follow a launcher's pages.
- A wallpaper bigger than the GPU's largest texture is shrunk to fit it, instead of failing to show.

### Fixed

Expand Down
11 changes: 7 additions & 4 deletions crates/render/src/depth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ impl DepthMap {
}

/// The map resized to `width` x `height`.
pub fn resized(self, width: u32, height: u32) -> Self {
let image =
image::ImageBuffer::<image::Luma<u16>, _>::from_raw(self.width, self.height, self.data)
.expect("a depth map's data matches its size");
pub fn resized(&self, width: u32, height: u32) -> Self {
let image = image::ImageBuffer::<image::Luma<u16>, _>::from_raw(
self.width,
self.height,
self.data.as_slice(),
)
.expect("a depth map's data matches its size");
Self {
data: imageops::resize(&image, width, height, FilterType::Triangle).into_raw(),
width,
Expand Down
4 changes: 3 additions & 1 deletion crates/render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
mod depth;
mod renderer;

pub use renderer::{DecodedWallpaper, OutputRenderState, Renderer, Wallpaper, WallpaperFiles};
pub use renderer::{
DecodedWallpaper, OutputRenderState, Renderer, View, Wallpaper, WallpaperFiles,
};
pub use shiftpaper_config::Transition;
Loading
Loading