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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ env:
# version like 1.70. Note that we only specify MAJOR.MINOR and not PATCH so that bugfixes still
# come automatically. If the version specified here is no longer the latest stable version,
# then please feel free to submit a PR that adjusts it along with the potential clippy fixes.
RUST_STABLE_VER: "1.89" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
RUST_STABLE_VER: "1.92" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
# The purpose of checking with the minimum supported Rust toolchain is to detect its staleness.
# If the compilation fails, then the version specified here needs to be bumped up to reality.
# Be sure to also update the rust-version property in the workspace Cargo.toml file,
# plus all the README.md files of the affected packages.
RUST_MIN_VER: "1.85"
RUST_MIN_VER: "1.92"
# List of packages that will be checked with the minimum supported Rust version.
# This should be limited to packages that are intended for publishing.
RUST_MIN_VER_PKGS: "-p piet -p piet-common -p piet-cairo -p piet-coregraphics -p piet-direct2d -p piet-svg -p piet-web"
Expand Down
85 changes: 37 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ version = "0.8.0"

edition = "2024"
# Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml and with the relevant README.md files.
rust-version = "1.85"
rust-version = "1.92"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ which should produce an image called `d2d-test-00-2.00.png`.

## Minimum supported Rust Version (MSRV)

This version of Piet has been verified to compile with **Rust 1.85** and later.
This version of Piet has been verified to compile with **Rust 1.92** and later.

Future versions of Piet might increase the Rust version requirement.
It will not be treated as a breaking change and as such can even happen with small patch releases.
Expand Down
6 changes: 3 additions & 3 deletions piet-cairo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ targets = []
[dependencies]
piet = { workspace = true }

cairo-rs = { version = "0.21.1", default-features = false } # We don't need glib
pango = { version = "0.21.1", features = ["v1_44"] }
pangocairo = "0.21.1"
cairo-rs = { version = "0.22.0", default-features = false } # We don't need glib
pango = { version = "0.22.0", features = ["v1_44"] }
pangocairo = "0.22.0"
unicode-segmentation = "1.12.0"
xi-unicode = "0.3.0"

Expand Down
4 changes: 2 additions & 2 deletions piet-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ png = { version = "0.17.16", optional = true }

[target.'cfg(any(target_os="linux", target_os="openbsd", target_os="freebsd", target_os="netbsd"))'.dependencies]
piet-cairo = { workspace = true }
cairo-rs = { version = "0.21.1", default-features = false }
cairo-sys-rs = { version = "0.21.1" }
cairo-rs = { version = "0.22.0", default-features = false }
cairo-sys-rs = { version = "0.22.0" }

[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
piet-coregraphics = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion piet-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [piet-web][] backend will be selected when targeting `wasm32`.

## Minimum supported Rust Version (MSRV)

This version of Piet has been verified to compile with **Rust 1.85** and later.
This version of Piet has been verified to compile with **Rust 1.92** and later.

Future versions of Piet might increase the Rust version requirement.
It will not be treated as a breaking change and as such can even happen with small patch releases.
Expand Down
17 changes: 9 additions & 8 deletions piet-coregraphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,15 @@ impl<'a> RenderContext for CoreGraphicsContext<'a> {
dst_rect: impl Into<Rect>,
interp: InterpolationMode,
) {
if let CoreGraphicsImage::YDown(image) = image {
if let Some(cropped) = image.cropped(to_cgrect(src_rect)) {
self.draw_image(&CoreGraphicsImage::YDown(cropped), dst_rect, interp);
}
} else if let CoreGraphicsImage::YUp(image) = image {
if let Some(cropped) = image.cropped(to_cgrect(src_rect)) {
self.draw_image(&CoreGraphicsImage::YUp(cropped), dst_rect, interp);
}
let src_cgrect = to_cgrect(src_rect);
if let CoreGraphicsImage::YDown(image) = image
&& let Some(cropped) = image.cropped(src_cgrect)
{
self.draw_image(&CoreGraphicsImage::YDown(cropped), dst_rect, interp);
} else if let CoreGraphicsImage::YUp(image) = image
&& let Some(cropped) = image.cropped(src_cgrect)
{
self.draw_image(&CoreGraphicsImage::YUp(cropped), dst_rect, interp);
}
}

Expand Down