Skip to content
Open
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
275 changes: 81 additions & 194 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ vello = { version = "0.9.0", path = "vello" }
vello_encoding = { version = "0.9.0", path = "vello_encoding" }
vello_shaders = { version = "0.9.0", path = "vello_shaders" }
bytemuck = { version = "1.25.0", features = ["derive"] }
skrifa = { version = "0.42.1", default-features = false, features = ["autohint_shaping"] }
skrifa = { version = "0.43.2", default-features = false, features = ["autohint_shaping"] }
# The version of kurbo used below should be kept in sync
# with the version of kurbo used by peniko.
peniko = { version = "0.6.1", default-features = false }
Expand Down Expand Up @@ -147,7 +147,7 @@ scenes = { path = "examples/scenes" }
svg = "0.18.0"
criterion = { version = "0.5.1", default-features = false }
rand = { version = "0.9.4", default-features = false, features = ["std_rng"] }
usvg = { version = "0.45.1" }
usvg = { version = "0.47" }
once_cell = "1.21.4"
console_error_panic_hook = "0.1.7"
console_log = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/scenes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ image = { workspace = true, features = ["jpeg"] }
rand = { workspace = true, features = ["thread_rng"] }

# for pico_svg
roxmltree = "0.20.0"
roxmltree = "0.21.1"
bytemuck.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/with_winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tracing-subscriber = { version = "0.3.23", default-features = false, features =
profiling = { version = "1.0.18", features = ["profile-with-tracing"] }

# For caching
jni = "0.21.1"
jni = "0.22"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = { workspace = true }
Expand Down
58 changes: 37 additions & 21 deletions examples/with_winit/src/minimal_pipeline_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,44 @@ fn get_cache_directory_android<T>(event_loop: &EventLoop<T>) -> anyhow::Result<P
use winit::platform::android::EventLoopExtAndroid;

let app = event_loop.android_app();
let app_jobject = unsafe { jni::objects::JObject::from_raw(app.activity_as_ptr().cast()) };
// If we got a null VM, we can't pass up
let jvm = unsafe { jni::JavaVM::from_raw(app.vm_as_ptr().cast()).context("Making VM")? };
let mut env = jvm.attach_current_thread().context("Attaching to thread")?;
let res = env
.call_method(app_jobject, "getCacheDir", "()Ljava/io/File;", &[])
.context("Calling GetCacheDir")?;
let file = res.l().context("Converting to JObject")?;
let directory_path = env
.call_method(file, "getAbsolutePath", "()Ljava/lang/String;", &[])
.context("Calling `getAbsolutePath`")?;
let string = directory_path.l().context("Converting to a string")?.into();
let string = env
.get_string(&string)
.context("Converting into a Rust string")?;
let string: String = string.into();
let dir = PathBuf::from(string).join("vello");
if !dir.exists() {
std::fs::create_dir(&dir).context("Creating pipeline cache directory")?;
}
// TODO: Also get the quota. This appears to be more involved, requiring a worker thread and being asynchronous
Ok(dir)
let jvm = unsafe { jni::JavaVM::from_raw(app.vm_as_ptr().cast()) };
jvm.attach_current_thread(|env| -> anyhow::Result<PathBuf> {
let app_jobject =
unsafe { jni::objects::JObject::from_raw(env, app.activity_as_ptr().cast()) };
let res = env
.call_method(
app_jobject,
jni::jni_str!("getCacheDir"),
jni::jni_sig!("()Ljava/io/File;"),
&[],
)
.context("Calling GetCacheDir")?;
let file = res.l().context("Converting to JObject")?;
let directory_path = env
.call_method(
file,
jni::jni_str!("getAbsolutePath"),
jni::jni_sig!("()Ljava/lang/String;"),
&[],
)
.context("Calling `getAbsolutePath`")?;
let string = env
.cast_local::<jni::objects::JString<'_>>(
directory_path.l().context("Converting to a string")?,
)
.context("Casting to JString")?;
let string: String = string
.try_to_string(env)
.context("Converting into a Rust string")?;
let dir = PathBuf::from(string).join("vello");
if !dir.exists() {
std::fs::create_dir(&dir).context("Creating pipeline cache directory")?;
}
// TODO: Also get the quota. This appears to be more involved, requiring a worker thread and being asynchronous
Ok(dir)
})
.context("Attaching to thread")
}

pub(crate) fn get_cache_directory<T>(
Expand Down
2 changes: 1 addition & 1 deletion sparse_strips/vello_bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vello_cpu = { workspace = true }
vello_dev_macros = { workspace = true }
criterion = { workspace = true }
image = { workspace = true, features = ["jpeg"] }
parley = { version = "0.9.0", default-features = true }
parley = { version = "0.11.0", default-features = true }
rand = { workspace = true, features = ["small_rng"] }
smallvec = { workspace = true }
usvg = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion sparse_strips/vello_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ peniko = { workspace = true, features = ["bytemuck"] }
fearless_simd = { workspace = true }
hashbrown = { workspace = true, features = ["raw-entry"] }
png = { workspace = true, optional = true }
roxmltree = { version = "0.20.0", optional = true }
roxmltree = { version = "0.21.1", optional = true }
smallvec = { workspace = true }
thiserror = { workspace = true, default-features = false }
guillotiere = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions sparse_strips/vello_example_scenes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ console_log = { workspace = true }
log = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
parley = { version = "0.9.0", default-features = false, features = ["std"] }
parley = { version = "0.11.0", default-features = false, features = ["std"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
parley = { version = "0.9.0", default-features = true }
parley = { version = "0.11.0", default-features = true }
2 changes: 1 addition & 1 deletion sparse_strips/vello_hybrid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ web-sys = { version = "0.3.98", features = [
png = { workspace = true }
pollster = { workspace = true }
vello_common = { workspace = true, features = ["pico_svg"] }
roxmltree = "0.20.0"
roxmltree = "0.21.1"

[features]
default = ["wgpu", "wgpu_default", "text"]
Expand Down
4 changes: 2 additions & 2 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ categories = ["testing", "graphics"]


[dependencies]
kompari = { git = "https://github.com/linebender/kompari.git", rev = "4b851413e1b17307064aa48c50e59d7e29656543" }
kompari-tasks = { git = "https://github.com/linebender/kompari.git", rev = "4b851413e1b17307064aa48c50e59d7e29656543" }
kompari = { git = "https://github.com/linebender/kompari.git", rev = "2643680d3e54a34b354a2dac5c62765c49d86176" }
kompari_tasks = { git = "https://github.com/linebender/kompari.git", rev = "2643680d3e54a34b354a2dac5c62765c49d86176" }
clap = { workspace = true, features = ["derive"] }

[lints]
Expand Down
1 change: 1 addition & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use kompari_tasks::{Actions, Args, Task};
use std::path::Path;
use std::process::Command;

#[derive(Debug)]
struct ActionsImpl();

#[derive(Parser, Debug)]
Expand Down
Loading