fix(jian-skia): upgrade skia-safe to 0.97 for OpenPencil downstream#1
Closed
Kayshen-X wants to merge 1 commit intoZSeven-W:mainfrom
Closed
fix(jian-skia): upgrade skia-safe to 0.97 for OpenPencil downstream#1Kayshen-X wants to merge 1 commit intoZSeven-W:mainfrom
Kayshen-X wants to merge 1 commit intoZSeven-W:mainfrom
Conversation
Contributor
Author
|
Superseded by direct branch on origin (no fork needed; ZSeven-W is owner). Reopening as origin PR. |
skia-safe 0.97 split path mutation onto `PathBuilder` (`detach()`-finishes
to an immutable `Path`), replaced `Path::transform(&Matrix)` with
`Path::with_transform(&Matrix) -> Path`, and re-shaped the gradient
shader builders into `gradient::Gradient { Colors, Interpolation }`.
Also adds `SkiaBackend::draw_on_canvas(&Canvas, &DrawOp)` for hosts
that own a GPU canvas outside `SkiaSurface` (OpenPencil's
`SharedSkiaContext`).
Why: unblock GPU-canvas integration on the OP host, and pull in the
upstream renderer fixes between 0.78 and 0.97 before the
openpencil-shell kill-spike lands. Codex review (CLEAN) confirmed
API-equivalence on gradient color-space + interpolation.
cargo test -p jian-skia: 32/32 (incl. golden_corpus PNG diff).
cargo test --workspace: all green.
cargo clippy --workspace: clean under -D warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
升级
jian-skia用的 skia-safe 0.78 → 0.97 以与 OpenPencil 的 P0 dep-stack 对齐(OP 已验证 skia-safe 0.97 + glutin 0.32 + glow 0.17 三 OS)。Changes
crates/jian-skia/Cargo.toml:skia-safe = "0.78"→"0.97.0"crates/jian-skia/src/path.rs:Path::move_to/line_to/quad_to/cubic_to/close→PathBuilder::*+builder.detach()(skia-safe 0.97 拆 Path/PathBuilder 风格)crates/jian-skia/src/backend.rs:path.transform(&m)→path.with_transform(&m)(0.97 改 builder pattern)crates/jian-skia/src/backend.rs:gradient_shader模块 →gradient::shaders::{linear_gradient, radial_gradient}(deprecation 修)crates/jian-skia/src/backend.rs: 加pub fn draw_on_canvas(&mut self, canvas: &skia_safe::Canvas, op: &DrawOp)(OpenPencil 需要在自管 GL surface canvas 上 dispatch DrawOp,原有draw_canvas是私有 helper)Verification
cargo build -p jian-skia --features textlayoutPASS (skia-safe 0.97)cargo test --workspace --exclude jian-host-desktop1000+ tests, 0 failurescargo test -p jian-host-desktop --no-default-features7 test suites PASScargo test -p jian-host-desktop --features run7 test suites PASScargo check -p jian-core --target wasm32-unknown-unknownPASScargo clippy --workspace --all-targets --features jian-skia/textlayout -- -D warningsPASSWhy downstream
OpenPencil Step 1a (Rust-ification G1) 复用 jian-skia 作 SkiaBackend;spec v19 + plan v7 双 FROZEN 后 P0.5 prereq 必须升 skia-safe 0.97 以对齐 OP P0 dep-stack。OP 暂 pin 此 commit(
<commit-sha>)作 fork pin,等待 upstream merge 后切回 ZSeven-W/jian。Notes
draw_on_canvas API 是为 OP 自管 GPU canvas 路径加的 utility;不影响 Jian 自身 SkiaSurface flow。