diff --git a/c/Cargo.toml b/c/Cargo.toml index ad5125f8d..53aac54c9 100644 --- a/c/Cargo.toml +++ b/c/Cargo.toml @@ -16,7 +16,7 @@ font-kit = "0.6" foreign-types = "0.3" gl = "0.14" libc = "0.2" -usvg = "0.9" +usvg = "0.20.0" [dependencies.pathfinder_canvas] features = ["pf-text"] diff --git a/demo/android/rust/Cargo.toml b/demo/android/rust/Cargo.toml index 3fabbcee4..509c669f1 100644 --- a/demo/android/rust/Cargo.toml +++ b/demo/android/rust/Cargo.toml @@ -24,3 +24,6 @@ path = "../../../gl" [dependencies.pathfinder_gpu] path = "../../../gpu" + +[dependencies.pathfinder_resources] +path = "../../../resources" diff --git a/demo/android/rust/src/lib.rs b/demo/android/rust/src/lib.rs index 2a129d7dd..cb879bad7 100644 --- a/demo/android/rust/src/lib.rs +++ b/demo/android/rust/src/lib.rs @@ -13,12 +13,12 @@ extern crate lazy_static; use jni::objects::{GlobalRef, JByteBuffer, JClass, JObject, JString, JValue}; use jni::{JNIEnv, JavaVM}; -use pathfinder_demo::window::{Event, SVGPath, View, Window, WindowSize}; +use pathfinder_demo::window::{Event, DataPath, View, Window, WindowSize}; use pathfinder_demo::DemoApp; use pathfinder_demo::Options; use pathfinder_geometry::vector::{Vector2I, vec2i}; use pathfinder_geometry::rect::RectI; -use pathfinder_gl::GLVersion; +use pathfinder_gl::{GLVersion, GLDevice}; use pathfinder_resources::ResourceLoader; use std::cell::RefCell; use std::io::Error as IOError; @@ -175,7 +175,7 @@ pub unsafe extern "system" fn Java_graphics_pathfinder_pathfinderdemo_Pathfinder EVENT_QUEUE .lock() .unwrap() - .push(Event::OpenSVG(SVGPath::Resource(string))) + .push(Event::OpenData(DataPath::Resource(string))) } struct WindowImpl { @@ -202,7 +202,7 @@ impl Window for WindowImpl { fn make_current(&mut self, _view: View) {} - fn present(&mut self) {} + fn present(&mut self, device: &mut GLDevice) {} fn resource_loader(&self) -> &dyn ResourceLoader { &RESOURCE_LOADER diff --git a/demo/common/Cargo.toml b/demo/common/Cargo.toml index 922b4b9f9..85a60a7ec 100644 --- a/demo/common/Cargo.toml +++ b/demo/common/Cargo.toml @@ -11,7 +11,7 @@ pf-gl = [] clap = "2.32" gl = "0.14" rayon = "1.0" -usvg = "0.9" +usvg = "0.20.0" [dependencies.image] version = "0.23" diff --git a/demo/common/src/lib.rs b/demo/common/src/lib.rs index 3d60d0441..b3490c612 100644 --- a/demo/common/src/lib.rs +++ b/demo/common/src/lib.rs @@ -789,7 +789,7 @@ fn load_scene(resource_loader: &dyn ResourceLoader, DataPath::Path(ref path) => std::fs::read(path).unwrap().into() }; - if let Ok(tree) = SvgTree::from_data(&data, &UsvgOptions::default()) { + if let Ok(tree) = SvgTree::from_data(&data, &UsvgOptions::default().to_ref()) { Content::Svg(tree) } else if let Ok(file) = PdfFile::from_data(data) { Content::Pdf { file, cache: PdfRenderCache::new(), page_nr: 0 } diff --git a/demo/magicleap/Cargo.toml b/demo/magicleap/Cargo.toml index 3d60f29a3..bffab1ca8 100644 --- a/demo/magicleap/Cargo.toml +++ b/demo/magicleap/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Alan Jeffrey "] [dependencies] gl = "0.14" rayon = "1.0" -usvg = "0.9" +usvg = "0.20.0" egl = "0.2" log = "0.4" smallvec = "1.2" diff --git a/svg/Cargo.toml b/svg/Cargo.toml index 1842c81dd..8361e5dbe 100644 --- a/svg/Cargo.toml +++ b/svg/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["pathfinder", "svg", "vector", "graphics", "gpu"] [dependencies] bitflags = "1.0" hashbrown = "0.7" -usvg = "0.9" +usvg = "0.20.0" [dependencies.pathfinder_color] path = "../color" diff --git a/svg/src/lib.rs b/svg/src/lib.rs index 71185ef97..4814e2436 100644 --- a/svg/src/lib.rs +++ b/svg/src/lib.rs @@ -100,7 +100,7 @@ impl SVGScene { state.transform = state.transform * node_transform; match *node.borrow() { NodeKind::Group(ref group) => { - if group.filter.is_some() { + if !group.filter.is_empty() { self.result_flags.insert(BuildResultFlags::UNSUPPORTED_FILTER_ATTR); } if group.mask.is_some() { diff --git a/utils/convert/Cargo.toml b/utils/convert/Cargo.toml index 4f88c522c..7af0d44a9 100644 --- a/utils/convert/Cargo.toml +++ b/utils/convert/Cargo.toml @@ -9,4 +9,4 @@ edition = "2018" [dependencies] pathfinder_export = { path = "../../export" } pathfinder_svg = { path = "../../svg" } -usvg = "0.9" +usvg = "0.20.0" diff --git a/utils/svg-to-skia/Cargo.toml b/utils/svg-to-skia/Cargo.toml index 06af2c75d..74732dfec 100644 --- a/utils/svg-to-skia/Cargo.toml +++ b/utils/svg-to-skia/Cargo.toml @@ -5,4 +5,4 @@ authors = ["Patrick Walton "] edition = "2018" [dependencies] -usvg = "0.9" +usvg = "0.20.0"